Asp.Net/IIS - How to resolve Http Error 500.19 - IIS Error code 0x8007000d

In this article I will explain how to solve the requested page cannot be accessed because the related configuration data for the page is invalid problem in IIS7.
While deploying Asp.Net web application in local IIS Server I get following error
Http 500.19 - IIS Error code 0x8007000d
"The requested page cannot be accessed because the related configuration data for the page is invalid."
It looks like the user account we are using for the app pool does not have accessible rights to our web folder, so it can not read from config file. Check the app pool and see what user it is configured to run as. Check the directory and see if that user has appropriate rights to it. Also check for IIS event logs to find out the exact error. We can go through some steps to resolve this issue.
1. Url Rewrite Module - Check if you are using Url Rewrite in your application config then this solution is useful. I had what appeared to be the same permissions issue on the web.config file. However, my problem was caused by IIS failing to load the config file because it contained
URL rewrite rules.

If your project referenced the IIS URL Rewriting module, but has not been installed on the IIS server yet. Installing this might fixed the issue.
You can use the Microsoft Web Platform Installer to install it. Go to Windows open IIS Manager, select website on the left pane and then click on Web Platform Installer to Execute it.
IISWebPlatformInstaller.png, IIS, Asp.Net, Error 500.19,

Search for URL Rerite package and click on install.
 InstallUrlRewriteModule.png, IIS, Asp.Net, Error 500.19,
2. Grant Access Permissions - Consider granting access rights on the web folder, ASP.NET is not authorized to access the requested resource.
  1. Open IIS Manager in Windows select the website and in the Right pane for actions select Edit Permissions.
  2. Select the Security tab and click on Edit button.
  3. Click "Add" to add the appropriate user or group.
  4. Click on Advanced and the Find Now button.
  5. Added user 'IIS_IUSRS' from the search results and click ok to return.
  6. Gave desired permissions to User 'IIS_IUSRS'
  7. Set & verify the Application Pool's Identity to 'ApplicationPoolIdentity'
3. Reset IIS Server - Try to reset IIS using command prompt
Open command prompt as an administrator and type following command.
> iisreset /restart
IISReset.png, IIS, Asp.Net, Error 500.19,
After successfull restart of IIS Server go to browser and hit F5 to run & check.
4. Install Asp.Net 4.5 Features and Extensions - Open Control Panel and select Programs > Turn Windows features on or off, a dialog box will open.

Select Internet Information Service then select > World Wide Web Services > Application Development Features > Asp.Net(latest version).
 TurnWindoesFeatureOnOff.png, IIS, Asp.Net, Error 500.19,

Whenever we select Asp.Net this will adds relevant mappings to handle ASP.NET extensions correctly.
Back to top