large files via Response.OutputStream.Write

R

Ryan Hartman

I am attempting to use the technique in KB 812406
(http://support.microsoft.com/?kbid=812406) to transfer
large files via Response.OutputStream.Write.

It works GREAT in in debug mode. But whenever I set
debug="false" in the web.config file clients get cutoff
after about 1.5 minutes.

There is no error raised the client simple gets an
incomplete file.

I've tried playing around with various timeout settings
in web.config and in IIS with no luck.

Any thoughts?

-ryan
(e-mail address removed)
 
J

Jacob Yang [MSFT]

Hi Ryan,

I am trying to reproduce the problem on my side now. More time is needed.

Currently I have a quick idea for your reference. Since we have set debug =
"false" in the web.config file, please make sure that we rebuild the
application and run the application with "Start without Debugging".

If I have misunderstood your concern, please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
R

Ryan Hartman

Jacob,

Thanks for looking into the problem. Here are some steps
to help you reproduct the problem.

1) built the project as described in KB 812406
2) Once you have it working built it in release mode, and
turing off debugging in web.config
3) Try to download a file from a client machine.
4) If you are sending a very large file (i.e. larger than
can be downloaded in 2 minutes) the client will not get
the entire file

thanks again for looking at the problem!
 
J

Jacob Yang [MSFT]

Hi Ryan,

Thank you for your update.

I have reproduced the problem on my side. Currently I am trying my best to
find the root cause. More time is needed. Thank you for your patience.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
R

Ryan Hartman

Jacob,

I'm happy that you are able to reproduce the problem.
I'll be eager to see if you are able to find a work-
around. Thanks again for the help!
 
A

Adam Semel

Hey Ryan,

I have tried the knowledge base article that you mentioned (Q812406) but
I was not able to reproduce the problem in IIS 5.0, but I was able to
reproduce the problem in IIS 6.0 on a remote machine. I have found that you
are correct in that the timining was exactly 90 seconds. This was very
helpful in finding the solution. I knew that the Server.ScriptTimeout was
set to 90 seconds by default. I then rebuilt the application setting the
ServerScriptTimeout to 360 (seconds) and I was able to continue to download
till I hit the 6 mintue mark. It seems you will have to decide how long you
want to set the Server.ScriptTimout to be for your users. This will have to
be greater than the time it takes them to download the file. The better
news however, is that we can set this property via code, so we can set it
back after we have completed the large file transfer.

Please let me know if you have any other questions.


Adam Semel
ASP Team
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
 
R

Ryan Hartman

Adam, Jacob,

Thank you both for the help. This fix does work!
Interesting note: Setting the Script timeout in the IIS
control panel doesn't seem to fix the problem. But
setting the Server.ScripTimeout out variable from inside
the code does seem to do the trick. Thanks guys!

-ryan
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top