Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I am facing a problem while downloading a file over HTTPS protocol in my application on IE8 or below explorers.

I have added the following lines to my code

Response.ClearHeaders()
Response.AddHeader("Cache-Control", " no-store, no-cache ")


Full code written :-
Response.Clear()
Response.ClearContent()
Response.Buffer = True
'Commented and Added By: Varun Sareen on 04/08/2014
Response.ClearHeaders()
Response.AddHeader("Cache-Control", " no-store, no-cache ")
Response.ExpiresAbsolute = System.DateTime.FromOADate(Now.ToOADate - 1)
Response.Expires = 0
Server.ScriptTimeout = Server.ScriptTimeout + 10000000
'************Till Here*****************
Response.Charset = ""
'Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = dt.Rows(0)("CPP_Party_FileContent").ToString()
Response.AddHeader("content-disposition", "attachment;filename=" & dt.Rows(0)("CPP_Party_FileName").ToString())
Response.BinaryWrite(bytes)
Response.Flush()
Response.End()


Now i am able to download the file over https protocol but when i click on the same file again then the System gets Hang.

Please help me resolve the problem.

Regards

Varun Sareen
Posted
Updated 3-Aug-14 23:40pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900