面对“底层连接已关闭:接收时发生意外错误".通过启用了MTOM的Web服务传输3 mb文件时出错. [英] Facing "The underlying connection was closed: An unexpected error occurred on a receive." error while transferring 3 mb file through Web-Service having MTOM enabled.

查看:95
本文介绍了面对“底层连接已关闭:接收时发生意外错误".通过启用了MTOM的Web服务传输3 mb文件时出错.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图通过我的Web服务以及启用了MTOM的此Web服务上传大小为3 MB及以上的.pdf文件.我在我的一个Web应用程序中调用此Web服务,该应用程序也启用了MTOM.
我引用了"http://blogs.eforceglobal.com/asrivastava/archive/2008/04/22/509.aspx"链接以在Web服务和Web应用程序中启用MTOM.

我想通过调用上述Web服务在我的Web应用程序中上载.pdf文件(文件大小为10 MB及以上).当我上载大小为2 MB及以下的文件时,它工作正常,但是尝试上载大小为3 MB及以上的文件时,我得到底层连接已关闭:接收时发生意外错误".我的Web应用程序中出现错误.

请您帮助我摆脱此错误,甚至由于两个应用程序中均启用了MTOM,所以我什至不理解此错误的原因.
在此先感谢!!

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!!

推荐答案

我在下面的代码中添加了

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

Web服务和Web应用程序的配置文件中的文件及其解析!!
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!!


您需要增加config中的值.

检查这些

基础连接已关闭:接收时发生意外错误 [基础连接已关闭:接收时发生意外错误. -Http客户端协议问题 [
You need increase the value in config.

Check these

The underlying connection was closed: An unexpected error occurred on a receive[^]
The underlying connection was closed: An unexpected error occurred on a receive. - Http Client Protocol Issues[^]


这篇关于面对“底层连接已关闭:接收时发生意外错误".通过启用了MTOM的Web服务传输3 mb文件时出错.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆