Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / IIS / IIS-Express

Launching IIS Express from Visual Studio 2010 without admin rights on Windows 7

0.00/5 (No votes)
7 Jan 2016CPOL1 min read 7K  
How to configure IIS Express so that it runs from Visual Studio without needing Visual Studio to be run with Admin rights.

I recently switched from using IIS to using IIS Express for developing ASP.NET applications with the express (pun intended) aim of no longer needing to run devenv.exe as Administrator, which is required if you are using IIS for development. Having revoked Admin access to Visual Studio, I duly fired it up and hit CTRL-F5 to browse my website, running on (for arguments' sake) port 280, to be greeted with a big error box stating "Unable to launch iis express web server. Access is denied". Fortunately, there is an easy fix.

Simply put, you need to run a netsh http command to add users to your local site, effectively granting them admin rights. If your site serves requests for external traffic, IIS Express needs to run with admin privileges.

To grant the correct privileges for all users, which should be fine for local development (as opposed to granting specific users correct rights), start a command prompt by right clicking > Run as Administrator and enter the following command (replacing the port number with the port number that you use for development of your particular website):

netsh http add urlacl http://localhost:280/ user=everyone

You should see a message saying "URL reservation successfully added" and your site should now run fine under IIS Express.

View original article

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)