C# WCF Error (413) Request Entity Too Large - Resolved
错误:Web Service: System.Net.WebException: The remote server returned an error: (413) Request Entity Too Large.你需要add maxBufferSize 和 maxReceivedMessageSize 在你的web.config里面,记得endpoint的binding也需要填写。
Please add maxBufferSize and maxReceivedMessageSize in your web.config and remember put binding in your endpoint.<system.serviceModel>
<services>
<service name="Svc.login" behaviorConfiguration="ServiceBehaviorStandard">
<endpoint address="" binding="webHttpBinding" contract="Svc.Ilogin" behaviorConfiguration="web"/>
</service>
</services>
<bindings>
<webHttpBinding>
<binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviorStandard">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
页:
[1]