471,336 Members | 1,280 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

Response.TransmitFile fail in the middle for modem user?

Oct
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.ServerVari ables["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.

Nov 19 '05 #1
1 2117
Oct


"Oct@ESI" wrote:
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.ServerVari ables["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.

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by jeffpriz | last post: by
1 post views Thread by Ryan Pedersen | last post: by
3 posts views Thread by Buddy Ackerman | last post: by
2 posts views Thread by mgalvez | last post: by
2 posts views Thread by EmeraldShield | last post: by
1 post views Thread by =?Utf-8?B?V29vZGdub21l?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.