mardi 18 avril 2017

How to remove the "" part from mvc

An mvc application I'm supposed to maintain doesn't work on FF.I have a site, which shows a pdf inside an <iframe>. When I try run it on FF, it shows me the Corrupted Content Error inside the iframe. The page you are trying to view cannot be shown because an error in the data transmission was detected . After googling a bit it seems it is due to having to many headers inside, so I checked in IE (it works properly on IE), and yeah, this was the frame content:

<object width="100%" height="100%" classid="clsid:......">
    <PARAM NAME="ExtentX" VALUE="25135">
    .... many other PARAM NAMEs>
<html style="display: none;">

So it appears to solve my problem I have to delete the <head> elements inside the fame. According to my googling it seems the problem is somewhere with the Response.appendHeader functions, but everything seems okay to me. My controller code:

Response.AddHeader("Content-Disposition", "inline; filename=" + fileName + "#toolbar=1&amp;view=FitV");
Response.AppendHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
Response.AppendHeader("Pragma", "no-cache"); // HTTP 1.0.
Response.AppendHeader("Expires", "0"); // Proxies.

Someone suggested adding those lines before those lines, but it didn't help:


Aucun commentaire:

Enregistrer un commentaire