Increase WcfService Request StringContentLength
I have some notes about various configuration of WCF service, for example Конфиги WCF-сервисов, обеспечивающие совместимость с JAVA, PHP, FLEX, without this tune you usually receive error:
To overcome this problem need to understand huge WCF configuration tool.
Or simple copy-past my version of configuration - endpoint node has reference to binding node what compose definition of maximum request length.
1: <?xml version="1.0"?>
2: <configuration>
3: <connectionStrings>
4: <add name="xxxx" connectionString="xxxxx" providerName="System.Data.SqlClient" />
5: </connectionStrings>
6: <appSettings>
7: <add key="DebugMode" value="True"/>
8: </appSettings>
9: <system.web>
10: <customErrors mode="Off"/>
11: <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
12: </system.web>
13: <system.serviceModel>
14: <services>
15: <service name="GraphhopperWcf1.Service1" behaviorConfiguration="debug" >
16: <endpoint address="" binding="basicHttpBinding"
17: bindingConfiguration="basicHttpBinding0" contract="GraphhopperWcf1.IService1" />
18: </service>
19: </services>
20: <bindings>
21: <basicHttpBinding>
22: <binding name="basicHttpBinding0" >
23: <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
24: maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
25: </binding>
26: </basicHttpBinding>
27: </bindings>
28: <behaviors>
29: <serviceBehaviors>
30: <behavior name="debug" >
31: <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
32: <serviceMetadata httpGetEnabled="true"/>
33: <!-- 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 -->
34: <serviceDebug includeExceptionDetailInFaults="true"/>
35: </behavior>
36: </serviceBehaviors>
37: </behaviors>
38: <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
39: </system.serviceModel>
40: <system.webServer>
41: <modules runAllManagedModulesForAllRequests="true"/>
42: <!--
43: To browse web app root directory during debugging, set the value below to true.
44: Set to false before deployment to avoid disclosing web app folder information.
45: -->
46: <directoryBrowse enabled="true"/>
47: </system.webServer>
48:
49: </configuration>
Comments (
)
Link to this page:
//www.vb-net.com/WCFStringContentLength/Index.htm
|