Response.TransmitFile fail in the middle for modem user?

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.
 
G

Guest

Oct@ESI said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top