Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.0 / Visual Studio 2010 - related configuration data for the page is invalid

I've just switched to using IIS7 in my Visual Studio 2010 project. I've run VS 2010 as an administrator to do so.

When I navigate to the URL for my page on the IIS server I get this message:

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



In the detailed error information it has this:

Module: IIS Web Core
Notification: BeginRequest
Handler: Not yet determined
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:\Users\Chris Paynter\Documents\Visual Studio 2010\Projects\TypeTest\TypeTest\web.config

Then in the config source it shows line 48 in red:

47:   <validation validateIntegratedModeConfiguration="false"/>
48:   <modules runAllManagedModulesForAllRequests="true"/>
49:   </system.webServer>

I'm very new to ASP.NET and it would be much appreciated if anyone can guide me in the right direction to resolving this.

Cheers

like image 567
Chris Avatar asked Dec 04 '10 05:12

Chris


1 Answers

With command prompt launched as Admnistrator, go to :

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>

execute

aspnet_regiis -i
like image 119
Firoze Rakib Avatar answered Oct 26 '22 13:10

Firoze Rakib