IE : Unable to download * from *. Unable to open this Internet site. The requested site is either unavailable or cannot be found

后端 未结 13 844
别跟我提以往
别跟我提以往 2020-11-29 22:03

I have an issue with my website and IE. I have a file Document.ashx that becomes a document from my database depending on the parameter passed in the query

13条回答
  •  甜味超标
    2020-11-29 22:56

    if you using asp.net. remove the code with sets cache

    Comment the following

           Response.Clear();
       Response.Buffer = true;
       Response.Charset = "";
       **//Response.Cache.SetCacheability(HttpCacheability.NoCache);**
       Response.ContentType = contentType;
       Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName);
       Response.BinaryWrite(bytes);
       Response.Flush();
       Response.End();
    

提交回复
热议问题