可能这个问题是重复的.我有一个WCF上传服务,客户端通过该服务将特定文件上传到服务器.
我可以通过该服务成功发送大小为12MB的文件.
现在,我已将自我认证的SSL证书集成到WCF服务.在没有SSL的情况下工作正常的相同应用程序现在返回错误,指出远程服务器返回错误(413)请求实体太大.
我该如何修复此错误是否与SSL有关?
我哪里错了.
<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="customHttpBinding" openTimeout="00:10:00" sendTimeout="00:10:00"
     maxReceivedMessageSize="10067108864"
      messageEncoding="Mtom" transferMode="Streamed">          
      <security mode="Transport">
        <transport clientCredentialType="Certificate" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="customServiceBehavior">
      <serviceMetadata httpsGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
      <serviceCredentials>
        <clientCertificate>
          <authentication certificateValidationMode="PeerOrChainTrust" trustedStoreLocation="LocalMachine"/>
        </clientCertificate>
      </serviceCredentials>
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service behaviorConfiguration="customServiceBehavior" name="FileTransferService">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="customHttpBinding"
      contract="IFileTransferService" />
  </service>
</services>
谢谢
这似乎是通过HTTPS修复413请求实体太大错误的故障
C:\Windows\System32\inetsrv>appcmd.exe set config "Default Web Site" -section:system.webServer/serverRunTime /uploadReadAheadSize:10485760 /commit:apphost
原因似乎与IIS如何通过SSL处理传入请求的身份验证有关.
另一种资源:http://blogs.msdn.com/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6的.aspx
我只是花了我的下午的大部分时间来追踪这个问题...许多其他的建议对我没什么帮助,但这肯定有,所以希望这会让你解决.