Configure IIS in VS 2005 on Vista
A Blog from Mike Irving, Software Developer
By Mike Irving - Published: 5/6/2008
Earlier this week I tried importing a Local IIS website in Visual Studio 2005 on my new Windows Vista PC.
Interestingly, if I clicked "Open Website" then clicked the "Local IIS" option, I received the following error, as opposed to receiving a list of available IIS websites:
"Unable to access IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine."
Instead, I opened the project from Source Control, and everything seemed to load ok. However, I couldn't build the project, doing so gave the following error:
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
A quick search on Google revealed the above error is in relation to not having the Virtual Directory set up as an application, as the error states. However, my Virtual directories were fine, infact IIS was already serving a previous build of the website.
Further digging revealed that the solution was to do with the way Visual Studio 2005 interacts with IIS.
In order to allow Visual Studio to have access to IIS 7.0, you have to enable an IIS 6.0 Compatability Mode in Vista.
To do this, follow the following steps:
- Goto Control Panel
- In the bottom left margin, click "Turn Windows features on or off"
- Expand "Internet Information Services"
- Expand "Web Management Tools"
- Select "IIS 6 Management Compatibility" and all sub-options
- Click "OK" to Apply
I then installed .Net Framework 3.5, which includes updates for Framework 1.1 and Framework 2.0 in Vista.
Following that, I removed my website from IIS, and went back into Visual Studio 2005....
I clicked "Open Website" then the "Source Control" tab. I opened the relevant project from Visual Source Safe, then clicked the "Run as IIS Web site" option.
All is now fine and dandy!
View Blog Entries...
Page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11