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
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.
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
User contributions licensed under CC BY-SA 3.0