我有一个简单的web方法
[WebMethod]
public int myWebMethod(string fileName, Byte[] fileContent)
Run Code Online (Sandbox Code Playgroud)
但是,每当我传递一个大于30mb的字节数组时,我都会收到错误:
HTTP错误404.13 - 未找到请求筛选模块配置为拒绝超过请求内容长度的请求.
我的web.config如下:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"> </compilation>
<authentication mode="Windows" />
<httpRuntime useFullyQualifiedRedirectUrl="true"
maxRequestLength="102400" requestLengthDiskThreshold="102400"
/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600"/>
</requestFiltering>
</security>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
我一直在搜索,这个问题最常见的原因是maxAllowedContentLength默认情况下属性为30mb.但是,我已将此设置为100mb,以及maxRequestLength属性httpRuntime.
我无法在任何地方找到解决方案,而不是设置我上面已尝试过的属性之一.有没有我错过的东西?