我 的 系统 :
互联 网 信息 服务 7.5
Visual Studio 2010 开发 工具
框架 四
我 做 了 一 个 接收 文件 ( 字节 数组 ) 的 Web 服务 。 我 做 了 一 个 使用 它 的 控制 台 应用 程序 ( 添加 服务 引用 - - 〉 高级 - - 〉 添加 Web 引用 ) 。 使用 http 时 , 它 工作 得 很 好 。 但 我 需要 使用 https 。 所以 , 当 我 尝试 使用 https 时 , 它 给 我 的 是 HTTP 413 :请求 实体 太 大 。 我 已经 读 了 很多 , 但 这 是 不 可能 的 。 我 已经 尝试 在 Web 服务 的 webconfig 中 放置 :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_INopService" maxReceivedMessageSize="22147483647" maxBufferPoolSize="252428800" maxBufferSize="22147483647">
<readerQuotas maxDepth="256" maxStringContentLength="22147483647" maxArrayLength="2222216384"
maxBytesPerRead="2222220000" maxNameTableCharCount="2222216384" ></readerQuotas>
</binding>
</basicHttpBinding>
<basicHttpBinding>
<binding name="HttpBigMessage"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
maxReceivedMessageSize="2147483647" >
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://localhost/hmenu/GetData.asmx"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_INopService"
contract="PhotoSavingsService.INopService" name="BasicHttpBinding_INopService" />
</client>
</system.serviceModel>
中 的 每 一 个
文件 不 太 大 。 我 需要 把 最 大 大小 放在 哪里 ?
谢谢
1条答案
按热度按时间mxg2im7a1#
多次通过添加行
给出500个错误
请找出哪个是already存在于您的web配置文件嗨,伙计们通常500错误发生,如果有任何错误的配置在web.config修复第一.这里我提供413实体太大的https协议问题修复
修复问题之前web.config
我们只是复制粘贴了reader quotas maxBufferPoolSize maxReceivedMessageSize在传输模式中的RestServiceBindingConfig这使技巧第一RestServiceBindingConfig用于https第二HttpRestServiceBindingConfig绑定用于http
问题修复后的web.config