G
Guest
I have implemented an ISAPI filter to authenticate user download based on SQL
data. It works great for all high speed users but it fail after 20-30 mins
download on modem (yes, 56k!) user. The error message on the client side is
"The connection with the server has been reset".
I have tried increasing Server.ScriptTimeout to 2 hours also Session timeout
to very long. I've set this on both the site property and explicitly run
time. It doesn't change a thing.
Here is some code
<httpHandlers>
<add verb="*" path="*.exe" type="MyHandler.NewHandler,httpHandler"/>
</httpHandlers>
Here is the code to send file to user
string strFileName =
context.Request.MapPath(context.Request.ServerVariables["PATH_INFO"]);
FileInfo myFile = new FileInfo(strFileName);
objResponse.AddHeader("Content-Disposition","attachment; filename=" +
myFile.Name);
objResponse.ContentType = "application/octet-stream";
objResponse.TransmitFile(myFile.Name);
objResponse.End();
BTW, I have tried Response.BinaryWrite. It doesn't experience this problem
but it seems to have quite worse performance than Response.TransmitFile.
data. It works great for all high speed users but it fail after 20-30 mins
download on modem (yes, 56k!) user. The error message on the client side is
"The connection with the server has been reset".
I have tried increasing Server.ScriptTimeout to 2 hours also Session timeout
to very long. I've set this on both the site property and explicitly run
time. It doesn't change a thing.
Here is some code
<httpHandlers>
<add verb="*" path="*.exe" type="MyHandler.NewHandler,httpHandler"/>
</httpHandlers>
Here is the code to send file to user
string strFileName =
context.Request.MapPath(context.Request.ServerVariables["PATH_INFO"]);
FileInfo myFile = new FileInfo(strFileName);
objResponse.AddHeader("Content-Disposition","attachment; filename=" +
myFile.Name);
objResponse.ContentType = "application/octet-stream";
objResponse.TransmitFile(myFile.Name);
objResponse.End();
BTW, I have tried Response.BinaryWrite. It doesn't experience this problem
but it seems to have quite worse performance than Response.TransmitFile.