Configure IIS 7 to work with Visual Studio 2008 in Windows 7
You should install IIS 7 prior to the installation of Visual Studio 2008, otherwise, you will need to run command aspnet_regiis –i with administrator permission. If you install IIS 7 with the default settings, you will get this error when you try to use local IIS instead of the built-in web server in VS 2008, or when you try to create a new web site project on local IIS instead of using the file system.
To access local IIS Web sites, you must install the following IIS components:
IIS Metabase and IIS 6 Configuration Compatibility
Windows Authentication
In addition, you must run Visual Studio in the context of an administrator account.
To install the above two IIS components:
1. Start => Control Panel => Programs
2. Click Turn Windows features on or off under Programs and Features section
3. Expand Internet Information Services, then check IIS Metabase and IIS 6 configuration compatibility and Windows Authentication as shown in the screen shot below:

4. Click OK to exit out.
You will notice you still cannot access local IIS Web sites through Visual Studio 2008 even after installing the missing IIS components, the reason is given in the above error message: you must run Visual Studio 2008 in the context of an administrator account. Since Windows Vista, by default, Windows runs applications in a limited-rights user account even when you are logged on to the computer as an administrator.
To run Visual Studio with administrative permissions in Windows Vista and 7:
- In Windows Vista, click Start, click All Programs, and then locate Visual Studio.
- Right-click Microsoft Visual Studio, and then click Run as administrator.
Now you should be able to access local IIS via Visual Studio 2008.
on September 14th, 2009 at 1:32 pm
Still not working on my Vista machine. Any other ideas?
on September 14th, 2009 at 1:43 pm
@Jon,
Can you give more information about your situation? Did you get any error on your Vista machine?
on October 2nd, 2009 at 1:58 pm
I am struggling to get a new Vista Business machine configured for ASP.Net development. I did install Visual Studio before I turned on the IIS 6 components. I did then run aspnetregiis. I think my trouble now is I have no clue how to configure my VisualStudio project to run in IIS. When I try to run my code I get error 404 can you help me?
on October 2nd, 2009 at 2:14 pm
@EP,
To run your project in IIS, follow these steps:
1. In Solution Explorer, right click your web application and select Properties.
2. On the left side, click Web
3. In Servers section, choose Use IIS Web server, then click Create Virtual Directory
Once the virtual directory is successfully created, you should be able to run your project in IIS.
Hope this helps.
on October 4th, 2009 at 2:21 am
can i have a detailed solution how to configure a web-application(asp.net) for IIS-7 ?I cannot run Visual studio 2008 project in IIS-7