The requested page cannot be accessed because the related configuration data for the page is invalid

Problem
When trying to consume a web service deployed to IIS, the following error is displayed:
Description: The requested page cannot be accessed because the related configuration data for the page is invalid.
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".
 
Then is complains about the <handlers> section in the web.config file.
 
Solution
 
To correct error I changed the following values located in the applicationHost.config file located in Windows\system32\inetsrv.
Change all of the following values located in section <configSections> –> <sectionGroup name="system.webServer">
<section name="handlers" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"
If you see any errors such as
 
Handler XXX has a bad module "ManagedPipelineHandler" in its module list
 
ensure you have ASP.NET properly installed (aspnet_regiis -i). Finally, ensure your app folder is a web app in IIS (not only a regular folder).
 
BR,
— AFurtado
This entry was posted in Computers and Internet. Bookmark the permalink.

1 Response to The requested page cannot be accessed because the related configuration data for the page is invalid

Leave a comment