10

For a problem that I am facing I need to increase the uploadReadAheadSize from 49K to 10M. I am able to change IIS's setting with

appcmd.exe set config "MyWebServicesSite" -section:serverRuntime /uploadReadAheadSize:10485760 /commit:apphost

which results in the applicationhost.config containing:

<location path="MyWebServicesSite" allowOverride="true">
    <system.webServer>
        <serverRuntime uploadReadAheadSize="10485760" />
    </system.webServer>
</location>

However, I am publishing my app to a remote server on which I dont have direct control on IIS's setting.

How can I put this setting in Web.config?

My attempts:

  1. Adding the following inside <system.webServer>

    <serverRuntime uploadReadAheadSize="10485760" />
    

Results: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

  1. Adding the following under <configuration>:

    <location path="EmsPublisherWebServicesSite" allowOverride="true">
        <system.webServer>
            <serverRuntime uploadReadAheadSize="10485760" />
        </system.webServer>
    </location>
    

    Results: No effect

Any help would be appreciated

2
  • 1
    Understad more about the problem now. The main problem is the setting being locked. How can it be overridden in Web.config? Commented Jan 19, 2017 at 20:53
  • stackoverflow.com/questions/31394838/… Commented May 22, 2019 at 11:41

2 Answers 2

5

If you do not have direct access, maybe you can request the other Admin to change the entry for you. It would be:

<section name="serverRuntime" overrideModeDefault="Allow" />

This matches with your:

<system.webServer>
<serverRuntime uploadReadAheadSize="10485760" />
...
Sign up to request clarification or add additional context in comments.

Comments

3

Run the following command in the command prompt as administrator:

%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/serverRuntime

See Adding serverRuntime tag in webconfig cause 500.19 error

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.