我得到一個錯誤WCF配置固定字符串的最大內容長度配額(8192)已超過
最大字符串內容長度配額(8192)已超過
我知道我需要修改我的WCF配置,但我無法正常工作。以下是我到目前爲止的內容:我嘗試使用內置的WCF編輯器。
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</wsHttpBinding>
</bindings>
<client>
<remove contract="IMetadataExchange" name="sb" />
<endpoint address="" binding="netTcpRelayBinding" contract="IMetadataExchange"
name="sb" />
</client>
<services>
<service name="SvcLibrary.Service1">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Design_Time_Addresses/SvcLibrary/Service1/"/>
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="wsHttpBinding" contract="SvcLibrary.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 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>
</system.serviceModel>
我做了這個變化,但我仍然得到同樣的錯誤。我是否也需要編輯端點部分? – GoBeavs
您是否刪除了綁定的名稱,所以與上面的名稱相同? – SCB
現在看起來像這樣: <的wsHttpBinding> 的wsHttpBinding > –
GoBeavs