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: 0×80070021
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
Advertisement
This entry was posted in Computers and Internet. Bookmark the permalink.

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s