IIS7 - Webrequest failing with a 404.13 when the size of the request params exceeds 30mb

后端 未结 2 1488
野的像风
野的像风 2020-12-31 00:54

I have a simple webmethod

[WebMethod]
public int myWebMethod(string fileName, Byte[] fileContent)

However, whenever I pass a byte array whi

相关标签:
2条回答
  • 2020-12-31 01:34

    You problem may lie in the fact that settings made in the web.config file may be superseded by corresponding settings present in both the applicationhost.config and machine.config files.

    If you have access to these, check if the overrideModeDefault property of the corresponding sections are set to Allow, as in the following example:

    machine.config

    <requestFiltering overrideModeDefault="Allow">
        <requestLimits maxAllowedContentLength="104857600"/>        
    </requestFiltering>
    

    AFAIK there is no way to override these settings if you don't have access to the corresponding configuration file.

    You may find more information about system-wide configuration and settings override here, here and here - and a very similar case here.

    0 讨论(0)
  • 2020-12-31 01:44

    This is pretty old. But I have the same problem today. To fix this, you need to make the necessary setting changes in web.config, then deploy to the web server. The important part is that you need to re-deploy your application to the web server. By doing so, the IIS settings are updated for you. Depending on how you do your deployment, you may need to delete your web application from the web server first, then deploy again. Updating web.config in place won't fix the problem. Hope this helps others with the same problem.

    0 讨论(0)
提交回复
热议问题