Bug 661830 - Stream reading from HTTPWebResponse (downloading) timed-out if a ServiceHost with any bindings
Summary: Stream reading from HTTPWebResponse (downloading) timed-out if a ServiceHost ...
Status: CONFIRMED
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: WCF (show other bugs)
Version: 2.8.x
Hardware: i386 RHEL 5
: P5 - None : Normal
Target Milestone: ---
Assignee: Atsushi Enomoto
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-30 09:19 UTC by Syed Husain Wan Mohamad Akbar
Modified: 2011-01-05 07:30 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
aenomoto: needinfo? (syed.husain)


Attachments
A sample program which simulate the download of a file, and after 15 seconds, starts a Service Host which will make the download timed-out (5.14 KB, text/plain)
2010-12-30 09:19 UTC, Syed Husain Wan Mohamad Akbar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syed Husain Wan Mohamad Akbar 2010-12-30 09:19:56 UTC
Created attachment 406576 [details]
A sample program which simulate the download of a file, and after 15 seconds, starts a Service Host which will make the download timed-out

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10

A Stream reading from HTTPWebResponse will timed-out if there's ServiceHost instantiate with any type of bindings - I've tested it using BasicHttpBinding and NetTcpBinding. This can be proven if the file is big enough.

If you look at the attachment, the code stop at Line 89 :

          currentDownloadChunks = resStream.Read(readBytes, 0, _downloadChunks);

Note : Most probably this code will work on Mono 2.6.7,but not Mono 2.8.1

Reproducible: Always

Steps to Reproduce:
1.Edit the sample program with the location of download file of your choice
2.The download file must be big, preferably 50Mb.
3.Run the program
4.After the Service Host has been instantiate, wait a few seconds and it will stop reading from the Stream.
Actual Results:  
Exception "The operation has timed out" will occurred.

Expected Results:  
The download finish

I'm running on Mono 2.8.1 which I build from source. Here are the steps that I took to build it:

build libgdiplus, mono-2.8.1, mod-mono, xsp
Comment 1 Forgotten User vxPDddArjq 2011-01-03 20:20:59 UTC
-> class libs.
Comment 2 Syed Husain Wan Mohamad Akbar 2011-01-04 01:09:05 UTC
What do you mean by class libs? Is there a package that I didn't build?
(In reply to comment #1)
> -> class libs.
Comment 3 Atsushi Enomoto 2011-01-04 01:32:45 UTC
That's a bug category change that you don't have to worry about.
Comment 4 Syed Husain Wan Mohamad Akbar 2011-01-04 01:34:00 UTC
Ah, ok. Cool.
Comment 5 Atsushi Enomoto 2011-01-05 06:00:46 UTC
Can't this be reasonably smaller repro? It takes forever to run.
Comment 6 Syed Husain Wan Mohamad Akbar 2011-01-05 07:30:03 UTC
I've cut all the codes to the essential part. So this is the smallest I can get. How I test it is by compiling the code using Visual Studio on my Windows machine, and copy the exe to the Centos machine. And then run the exe using mono.

Perhaps you want the .exe?