Learning While Aging

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.

IISComponentsNeeded

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:

IIS7Settings

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:

  1. In Windows Vista, click Start, click All Programs, and then locate Visual Studio.
  2. Right-click Microsoft Visual Studio, and then click Run as administrator.

Now you should be able to access local IIS via Visual Studio 2008.

0 0 votes
Article Rating
Subscribe
Notify of
guest

11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jon
Jon
14 years ago

Still not working on my Vista machine. Any other ideas?

EP
EP
14 years ago

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?

Emon
Emon
14 years ago

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

R.L.
R.L.
14 years ago

Thanks–you saved me some time and stress with this tip.

Hermes Neto
Hermes Neto
13 years ago

This worked until I install VS2010 in the same machine.  After that I lost the ‘Windows Authentication’ component on IIS.   VS2010 f**ked my development environment.

Steph
Steph
13 years ago

thank you!

Jamie F
Jamie F
13 years ago

After 20 minutes of googling other sites, this one actually fixed my problem, just follow every step.
 
Good post, I salute you.

jorge
jorge
12 years ago

Gracias muy buen aporte, solucionado

11
0
Would love your thoughts, please comment.x
()
x