To overcome the problem of sending large files via web services you can split a file into X number of file fragments, and then send them all to the server, where they would be combined to reproduce the original file on the server.
NOTE:If you find my response contains a reference to a third party World Wide Web site, I am providing this information as a convenience to you.Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,Microsoft cannot make any representations regarding the quality,safety, or suitability of any software or information found there.
__________________________________________________
Sincerely,
Young Fang
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
thanks for the response. I used a similar solution to resolve the problem temporary. Is there no other way to send larger files? The max. file size is 10 MB, when I try to send an higher file size, the connection would be closed. If I can send files up to
20 MB, I'm happy....
NOTE:If you find my response contains a reference to a third party World Wide Web site, I am providing this information as a convenience to you.Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,Microsoft cannot make any representations regarding the quality,safety, or suitability of any software or information found there.
__________________________________________________
Sincerely,
Young Fang
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Thanks a lot! I have installed WSE 3.0 and reconfigured the web.config. Now I'm able to send files with size up to 70 MB. I don't understand, because now the limit is by 70 MB, but it works. Another configuration, that didn't work is to set the maxMessageLength
(described in the MSDN article) to an higher value. It says that httpruntime don't support a property named "maxMessageLength"....
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
phil.net
0 Points
7 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
May 25, 2007 09:36 AM|LINK
@khalidzaheer
why don't you open your own thread for your problem?
khalidzaheer
Member
6 Points
8 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
May 25, 2007 09:42 AM|LINK
sory for interfaring
i have posted new thread but cant even see that in list
may b pending in the queque
i didnt find any response
may be my request is pending in the queue for administrator to have a look at it
Young Fang -...
All-Star
17147 Points
1620 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
May 29, 2007 03:04 AM|LINK
Hi ,
To overcome the problem of sending large files via web services you can split a file into X number of file fragments, and then send them all to the server, where they would be combined to reproduce the original file on the server.
Here you can find sample code:
http://www.codeproject.com/cs/webservices/DimeBufferedUpload.asp
__________________________________________________
Sincerely,
Young Fang
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
phil.net
0 Points
7 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
May 29, 2007 06:33 AM|LINK
Hello,
thanks for the response. I used a similar solution to resolve the problem temporary. Is there no other way to send larger files? The max. file size is 10 MB, when I try to send an higher file size, the connection would be closed. If I can send files up to 20 MB, I'm happy....
Young Fang -...
All-Star
17147 Points
1620 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
May 30, 2007 08:25 AM|LINK
Hi,
How about using the Message Transmission Optimization Mechanism (MTOM) specification for transmitting large amounts of data to and from Web services.
To send and receive the largest possible SOAP messages, you can set the value of the <maxMessageLength> element to -1.
Please have a look at below links for sample code:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse3.0/html/4344d43e-ceb4-43a9-8f8c-6a3f89f786bd.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse3.0/html/b4b19453-e4e4-4056-906d-72504ed8c0df.asp
__________________________________________________
Sincerely,
Young Fang
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
phil.net
0 Points
7 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
Jun 01, 2007 10:50 AM|LINK
Thanks a lot! I have installed WSE 3.0 and reconfigured the web.config. Now I'm able to send files with size up to 70 MB. I don't understand, because now the limit is by 70 MB, but it works. Another configuration, that didn't work is to set the maxMessageLength (described in the MSDN article) to an higher value. It says that httpruntime don't support a property named "maxMessageLength"....
TATWORTH
All-Star
72405 Points
14018 Posts
MVP
Re: The underlying connection was closed: An unexpected error occurred on a receive.
Oct 31, 2007 02:24 PM|LINK
The link to the article on MSDN is now http://msdn2.microsoft.com/en-us/library/Aa528822.aspx
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
cindy998
Member
5 Points
2 Posts
Re: The underlying connection was closed: An unexpected error occurred on a receive.
Dec 21, 2009 11:31 PM|LINK
I had the same error a week ago and I found a solution here :
http://www.asp.net.nepalesemap.com/index.php?topic=12.0
There are several solutions for this. You can find the list of solutions here:
http://www.asp.net.nepalesemap.com/index.php?board=2.0