IIS7 - Specifying content-length header in ASP causes "connection reset" error
Posted
by MisterZimbu
on Stack Overflow
See other posts from Stack Overflow
or by MisterZimbu
Published on 2010-06-14T19:18:36Z
Indexed on
2010/06/14
19:22 UTC
Read the original article
Hit count: 328
I'm migrating a series of websites from an existing IIS5 server to a brand new IIS7 web server. One of the pages pulls a data file from a blob in the database and serves it to the end user:
Response.ContentType = rs("contentType")
Response.AddHeader "Content-Disposition", "attachment;filename=" & Trim(rs("docName"))&rs("suffix")' let the browser know the file name
Response.AddHeader "Content-Length", cstr(rs("docsize"))' let the browser know the file size
Testing this in the new IIS7 install, I get a "Connection Reset" error in both Internet Explorer and Firefox. The document is served up correctly if the Content-Length header is removed (but then the user won't get a useful progress bar).
Any ideas on how to correct this; whether it be a server configuration option or via code?
Thanks.
© Stack Overflow or respective owner