如何使用WCF在asp.net网站做大文件传输?

weixin_38048892 2016-12-08 02:51:17
上传大文件失败:页面提示:

HTTP 错误 404.13 - Not Found
请求筛选模块被配置为拒绝超过请求内容长度的请求。
<fieldset>
最可能的原因:

Web 服务器上的请求筛选被配置为拒绝该请求,因为内容长度超过配置的值。
</fieldset>


<fieldset>
可尝试的操作:

确认 applicationhost.config 或 web.config 文件中的 configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength 设置。
</fieldset>
详细错误信息:




模块
   RequestFilteringModule


通知
   BeginRequest


处理程序
   PageHandlerFactory-Integrated-4.0


错误代码
   0x00000000








请求的 URL
   http://localhost:9259/FilesManage/SoftVersionUpdate_Edit.aspx?id=1


物理路径
   F:\Project\老版CAC选型软件\trunk\Source\Code\GreenWeb\GreenWeb\FilesManage\SoftVersionUpdate_Edit.aspx


登录方法
   尚未确定


登录用户
   尚未确定


请求跟踪目录
   C:\Users\361572\Documents\IISExpress\TraceLogFiles\GREENWEB(1)





客户端加了配置的:
        <binding name="BasicHttpBinding_IUpLoadService"  closeTimeout="00:10:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
          maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Buffered"         
          >  

然后server.web也加了:<httpRuntime maxRequestLength="102400" />

服务端的配置:
          <binding name="BasicHttpBinding_IUpLoadService" maxReceivedMessageSize="2147483647" 
           messageEncoding="Text" transferMode="Streamed" sendTimeout="00:10:00"
          maxBufferSize="2147483647"  >
          </binding>
然后service也加了:
        <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUpLoadService"
          contract="BJ.WEB.WCF.IUpLoadService" />
        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
          contract="IMetadataExchange" />
server.web也加了:<httpRuntime maxRequestLength="102400" />
可是就是出现这个问题,

...全文
20 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复

476

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧