Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am trying to upload a .pdf file having size 3 MB and more through my Web-Service and this Web-Service having MTOM enabled. I am calling this Web-Service in my one of the web application and that application also MTOM enabled.
I referred “http://blogs.eforceglobal.com/asrivastava/archive/2008/04/22/509.aspx” link to enable MTOM in both the Web-Service and web application.

I want to upload .pdf file (having size 10 MB and more) in my web application by calling above mentioned web-service. When I was uploading a file having size 2 MB and less it was working fine but while trying to upload a file having size 3 MB and more I am getting “The underlying connection was closed: An unexpected error occurred on a receive.” error in my web application.

Request you to please help me to get out from this error and even I don’t understand the reason of this error as the MTOM is enabled in both the application.

Thanks in Advance!!
Posted
Updated 18-Dec-19 18:56pm

I have added below code

"<httpRuntime maxRequestLength="19000" executionTimeout="360000" />"

in config file for both the Web-Service and Web Application and its get resolved!!
 
Share this answer
 
Comments
Dalek Dave 8-Dec-11 4:33am    
Good Answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900