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

7

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

asp.net
visual-studio
visual-studio-2010
iis
iis-7
asked on Stack Overflow Dec 4, 2010 by Chris

2 Answers

2

With command prompt launched as Admnistrator, go to :

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

execute

aspnet_regiis -i
answered on Stack Overflow Mar 11, 2013 by Firoze Rakib • edited Mar 11, 2013 by p.s.w.g
0

Sounds like the application pool the website is running is not configured correctly. You're probably using the wrong Managed Pipeline Mode.

In IIS7 manager find the Application Pool your web site is using (To check the app-pool click the website in the tree, then click "Basic settings" in the right pane, the Application pool name is then shown in the dialog). If you click the "Application pools" item in the tree to the left you will see a list of Application Pools in the middle. Your application pool should probably be running in "Classic Managed Pipeline Mode" if it has been ported directly to IIS7 from an IIS6 server.

To change the Pipeline mode, select the App-pool in the list then click "Basic Settings" to the right, the dialog shown also lets you select the .NET framework version used when running the site.

You can read more about pipeline modes on MSDN

Regards Jesper Hauge

answered on Stack Overflow May 23, 2011 by Hauge

User contributions licensed under CC BY-SA 3.0