1
votes

The following is the system.webServer section in my web.config:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />

    <httpLogging dontLog="false" selectiveLogging="LogError" />

</system.webServer>

It's an MVC 4 web application and what I am trying to accomplish here is to disable IIS logging when deploying my MVC app to Azure. But every time I run the web application with the httpLogging node I get a 500 error.

I've tested the web application in Visual Studio's IIS Express and my local Azure emulator and both resulted in a 500 error with the following message:

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".

enter image description here

What am I doing wrong?

1

1 Answers

3
votes

For security reasons you can't change some sections in Web.Config.

You can change this settings. Here is a great answer how to do it on local machine or server where you can access admin console. For this question the are some other answer and you can find out how to change it with command line.