C# webservice WCF上超出了maxRequestLength
我的Web服务遇到一些问题,请求超出了我的Web服务上的最大int大小。我已经将webconfig设置为该值,但它不起作用C# webservice WCF上超出了maxRequestLength,c#,wcf,web-config,webserver,asmx,C#,Wcf,Web Config,Webserver,Asmx,我的Web服务遇到一些问题,请求超出了我的Web服务上的最大int大小。我已经将webconfig设置为该值,但它不起作用 <httpRuntime targetFramework="4.5.1" executionTimeout="300" maxRequestLength="2147483647" /> 有没有办法将其设置为大于2147483647 是的,我已经在这里检查了这些答案,但是没有一个有我对这个问题的解决方案尝试添加以下配置。 绑定配置。 <binding
<httpRuntime targetFramework="4.5.1" executionTimeout="300" maxRequestLength="2147483647" />
有没有办法将其设置为大于2147483647
是的,我已经在这里检查了这些答案,但是没有一个有我对这个问题的解决方案尝试添加以下配置。
绑定配置。
<binding name="mybinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
数据构造序列化程序。<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="mybehavior">
<serviceMetadata httpsGetEnabled="true" httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
不要忘记在客户端和服务器端之间应用配置(我们应该在客户端和服务器端端点上添加此配置)。在服务部分添加bindingConfiguration和behaviorConfiguration
<system.serviceModel>
<services>
<service name="WcfService2.Service1" behaviorConfiguration="mybehavior">
<endpoint address="" binding="wsHttpBinding" contract="WcfService2.IService1" bindingConfiguration="mybinding"/>
如果问题仍然存在,请随时通知我。经过长时间搜索,我们在webservice web.config文件中找到了此解决方案设置
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2200000000"/>
</requestFiltering>
</security>
</system.webServer>
您能否共享您的WCF配置?