Sunday, February 26, 2012

HTTP Error 500.19 - Internal Server Error

THE ERROR:

HTTP Error 500.19 - Internal Server Error with Error Code: 0x80070021
The requested page cannot be accessed because the related configuration data for the page is invalid.

ERROR DETAILS:

Module: RequestFilteringModule
Notification: BeginRequest
Handler: StaticFile
Error Code: 0x80070021 Config Error: 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".
Config File: \\?\C:\RnDInternet\web.config
152: <security>
153: <requestFiltering allowDoubleEscaping="true"/>
154: </security>


ERROR SCREEN SHOT:

KB Article for this error:

http://support.microsoft.com/kb/942055/ does discuss other error code but does not talk about this Error Code: 0x80070021.

STEPS TO RESOLVE - HOW TO CORRECT:

Most of the time following steps correct this issue:
  • Go to C:\Windows\System32\inetsrv\config folder and open applicationHost.config file. Search for <section name="handlers"
    Change

    <section name="handlers" overrideModeDefault="Deny" />
    TO
    <section name="handlers" overrideModeDefault="Allow" />
  • Alternatively you can use appcmd.exe command to unlock this section.

    Use following command to unlock this section globally:

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

    Use following command to unlock this section for a particular site/app:

    %windir%\system32\inetsrv\appcmd.exe unlock config "SiteName/app/url" -section:system.webServer/security/requestFiltering
But in my case I already had the required changes in applicationHost.config file. Also I notice the error code is different then normally error code. To resolve the issue I had to uninstall the IIS feature and add it back. Just by doing this everything works.
To uninstall & Install the IIS feature, go to Control Panel –> Programs and Features and then click at “Turn windows feature on or off”.
 It will open a new dialog box in which select & expand the “Internet Information Services” –> “World Wide Web services” –> “Application Development Features” and uncheck everything. Click OK to start uninstall process.

 After the uninstall is done, follow the same process to open Windows Feature dialog box and select the features you want. I normally install following features.
 I hoe this article will help other facing similar issue. Please feel free to share more tips and suggestions.


 

1 comment:

  1. I read your error.If you install a new version asp.net in your PC & run a older version program so you can change your default program run i your PC.for more help visit Web Programming solutions.

    ReplyDelete

web programming