玩转CSLA.NET小技巧系列二:使用WCF无法上传附件,提示413 Entity Too Large
2014-01-05 11:21
369 查看
背景:由于系统需要展示图片,客户上传图片到本地客户端目录,然后在数据库中存储本地图片地址,和图片二进制数据
错误原因:我是使用CSLA的WCF服务,使用了数据门户,WCF协议使用的是wsHttpBinding,上传图片大小为512KB,并且已经配置了
上传限制到2GB,但是还是没有办法上传512KB的图片
但是我切换到basicHttpBinding时,竟然可以上传
说实话我对WCF不是很熟悉,希望知道原因的能留个言,大家讨论下
错误原因:我是使用CSLA的WCF服务,使用了数据门户,WCF协议使用的是wsHttpBinding,上传图片大小为512KB,并且已经配置了
<httpRuntime maxRequestLength="2147483647"/> <wsHttpBinding> <binding name="wsHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00" messageEncoding="Mtom"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384"/> </binding> </wsHttpBinding>
上传限制到2GB,但是还是没有办法上传512KB的图片
但是我切换到basicHttpBinding时,竟然可以上传
<httpRuntime maxRequestLength="2147483647"/> <basicHttpBinding> <binding name="basicHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"> <readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647" maxDepth="2147483647" /> </binding> </basicHttpBinding>
说实话我对WCF不是很熟悉,希望知道原因的能留个言,大家讨论下
相关文章推荐
- Nginx上传文件提示413 Request Entity Too Large
- linux 使用nginx代理上传大文件 413 request entity too large
- 使用nginx做反代时遇到413 Request Entity Too Large的解决方法
- 上传文件限制导致413-Request Entity Too Large
- 玩转CSLA.NET小技巧系列一:跳转页面丢失session,如何解决
- 关于使用Git的时候出现"HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large"的解决方法
- 上传文件失败 Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
- ueditor 上传视频报错 413 Request Entity Too Large
- WCF错误远程服务器返回了意外响应: (413) Request Entity Too Large。解决方案
- nginx:413 Request Entity Too Large 及 修改 PHP上传文件大小配置
- 上传大文件问题 413 (Request Entity Too Large)
- (原)使用TortoiseGit提交代码push的时候报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
- WCF错误:413 Request Entity Too Large
- 关于使用Tomcat服务器出现413错误的解决办法(Request Entity Too Large)
- WCF错误:413 Request Entity Too Large
- nginx 上传文件出现413 Request Entity Too Large 的解决方法
- nginx:413 Request Entity Too Large的处理办法--修改 PHP上传文件大小
- 安装wordpress,上传主题文件时候nginx出现:413 Request Entity Too Large
- WCF错误:413 Request Entity Too Large
- nginx:413 Request Entity Too Large 及 修改 PHP上传文件大小配置