作为 WCF 的新手,请帮帮我。我收到这个错误。我在互联网上搜索过这个问题,我有很多解决方案,但是当我应用这些解决方案时。我面临的一些新问题。所以请给我一个有效的解决方案。
已超出传入邮件 (65536) 的最大邮件大小配额。要增加配额,请在适当的绑定元素上使用 MaxReceivedMessageSize 属性。
服务 Web.config 文件。
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="WSHttpBinding_IService1" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="WcfServiceZone_Store.Service1" behaviorConfiguration="metadataBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="WcfServiceZone_Store.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="metadataBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
客户端 Web.config 文件:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="WSHttpBinding_IService1" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:50274/Service1.svc" binding="wsHttpBinding" contract="ServiceReference1.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
请告诉我,我需要在哪一侧进行更改。