本文介绍了上传文件错误 - 远程服务器返回意外响应:(413)请求实体太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我在服务器端制作WCF服务以上传文件并插入数据库。但是,我发现问题..当我从桌面应用程序上传文件(调用该WCF服务)时,它说远程服务器返回了意外的响应: (413)请求实体太大..我找到了来自互联网的解决方案,他们说要增加uploadreadaheadsize,请求过滤,maxReceivedMessageSize,maxBufferSize,maxbufferpoolsize等的值(在app.config和web.config中)..我试过所有这些,但它是一样的.. 这里是我的web.config < serverRuntime uploadReadAheadSize = 2147483647/> < security> < requestFiltering> < requestLimits maxAllowedContentLength =2147483647/> < / requestFiltering> < / security> < /system.webServer> < system.serviceModel> < bindings> < basicHttpBinding> < binding name =basicHttpallowCookies =true maxReceivedMessageSize =2147483647 maxBufferSize =2147483647 maxBufferPoolSize =2147483647 transferMode =Streamed messageEncoding =Text textEncoding =utf-8 bypassProxyOnLocal =false useDefaultWebProxy =true> < readerQuotas maxDepth =2147483647 maxArrayLength =2147483647 maxStringContentLength =2147483647 maxBytesPerRead =2147483647 maxNameTableCharCount =2147483647/> ; < / binding> < / basicHttpBinding> < / bindings> < behavior> < serviceBehaviors> < behavior name => < dataContractSerializer maxItemsInObjectGraph =2147483647/> < serviceMetadata httpGetEnabled =true/> < serviceDebug includeExceptionDetailInFaults =true/> < / behavior> < / serviceBehaviors> < endpointBehaviors> < behavior> < dataContractSerializer maxItemsInObjectGraph =2147483647/> < / behavior> < / endpointBehaviors> < / behavior> 这是我的app.config <绑定> < basicHttpBinding> < binding name =BasicHttpBinding_IServiceallowCookies =false bypassProxyOnLocal =falsemaxBufferPoolSize =2147483647maxReceivedMessageSize =2147483647maxBufferSize =2147483647 useDefaultWebProxy =true > < readerQuotas maxDepth =2147483647 maxArrayLength =2147483647 maxStringContentLength =2147483647 maxBytesPerRead =2147483647 maxNameTableCharCount =2147483647/> ; < security mode =None/> < / binding> < / basicHttpBinding> < / bindings> < behavior> < serviceBehaviors> < behavior name => < dataContractSerializer maxItemsInObjectGraph =2147483647/> < serviceMetadata httpGetEnabled =true/> < serviceDebug includeExceptionDetailInFaults =true/> < / behavior> < / serviceBehaviors> < endpointBehaviors> < behavior> < dataContractSerializer maxItemsInObjectGraph =2147483647/> < / behavior> < / endpointBehaviors> < / behavior> < client> < endpoint address =http:// localhost:3724 / Service.svcbinding =basicHttpBinding bindingConfiguration =BasicHttpBinding_IServicecontract =ServiceReference1.IService/> < / client> 你能给我解决方案吗?我非常需要它..谢谢解决方案 这篇关于上传文件错误 - 远程服务器返回意外响应:(413)请求实体太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-08 04:18