469,269 Members | 1,006 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,269 developers. It's quick & easy.

ASPX error using response.writefile -"the server reset the connect

We are streaming a PDF file out of an ASPX page in IIS 5 using Response.WriteFile so the user does not need permissions to the directory where the files are stored. This works great when the user is on a fairly fast network connection or when the PDF is not too large. However, for users on slow connections that try to download a large PDF (+30meg), they receive a "the server reset the connection" error message after about 15 minutes of downloading. We tried increasing the Server.ScriptTimeout of the ASPX but without success probably because the ASPX itself executes fairly quickly, it's just the data stream download to the client that is taking so long. What is causing the timeout and can we increase it?
--
Thanks,
Chris.
Nov 18 '05 #1
4 5131
I think you can set timeout to be longer in the web.config. Do a google search and you should come up with something. I can't remember off the top of my head

"whoopdaddy" wrote:
We are streaming a PDF file out of an ASPX page in IIS 5 using Response.WriteFile so the user does not need permissions to the directory where the files are stored. This works great when the user is on a fairly fast network connection or when the PDF is not too large. However, for users on slow connections that try to download a large PDF (+30meg), they receive a "the server reset the connection" error message after about 15 minutes of downloading. We tried increasing the Server.ScriptTimeout of the ASPX but without success probably because the ASPX itself executes fairly quickly, it's just the data stream download to the client that is taking so long. What is causing the timeout and can we increase it?
--
Thanks,
Chris.

Nov 18 '05 #2
Hi Chris,

From your description, you encoutnered the "Connection reset" error
sometimes when the user is downloading a file (with large size and not very
fast newwork bandwidth), yes?

Generally, such issues is likely due to the timeout setting for the IIS or
ASP.NET, as you mentioned that you've tried the Server.ScriptTimeout and
with no success, I think you can also have a look at the "executionTimeout"
attribute in the <httpRuntime> configuration element for asp.net, here is
the reference in MSDN:

#<httpRuntime> Element
http://msdn.microsoft.com/library/en...pruntimesectio
n.asp?frame=true

Also, I think it's better to write the file via a buffer field rather than
directly write into the response stream by response.write file, you may
have a look at the following kb article for some reference.

#PRB: Response.WriteFile Cannot Download a Large File
http://support.microsoft.com/?id=812406

In addition, if you still have no success on this problem. I suggest that
You have a look at the IIS log or feel free to post here so that we can
also have a look to see whether it provides any clues. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Hi Chris,

Thanks for your followup. AS you mentioned that the timeout problem still
occurs, I think you can have a try using the buffering output means
mentioned in the following kb article:

#PRB: Response.WriteFile Cannot Download a Large File
http://support.microsoft.com/?id=812406

Using a buffer to output the stream content may be more efficient when the
file size if large. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Hi Chris,

Have you got any further progress on this issue? If there're anything else
we can help, please feel free to post here.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Nathan Sokalski | last post: by
14 posts views Thread by Warren Tang | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.