28

I've upgraded to iis express 7.5 with VS2010 SP1. Within the release notes it specified that express is able to run WITHOUT administrator permissions. When I try to run from the commandline (powershell cmd line) I receive the same "Access Denied" error (shown below) I was getting running with IIS Express 7.

As far as I can tell admin rights is still required.

Anyone been able to run without admin rights?

The detailed error message is:

Failed to call HttpAddUrl with http://MACHINE-NAME:80/
Failed to register URL "http://MACHINE-NAME:80/" for site "WebSiteName" application "/". Error description: Access is denied. (0x80070005)
Martin Hollingsworth
  • 7,249
  • 7
  • 49
  • 51
jdiaz
  • 7,354
  • 12
  • 42
  • 51

3 Answers3

39

It is also possible to run IIS Express as a non administrative user on reserved ports and serve requests for external traffic but you need to configure the HTTP service to allow this. The Netsh Commands for Hypertext Transfer Protocol (HTTP) technet page describes this in detail for a Windows 7 machine (also Vista, Server 2008 etc). As you would expect you need to run the configuration command as an administrator. Examples of the command to add and delete the permission are:

netsh http add urlacl url=http://YOUR-MACHINE-NAME:80/ user=DOMAINNAME\GroupOrUserName
netsh http delete urlacl url=http://YOUR-MACHINE-NAME:80/

This works for me on Windows 7 and although I can't verify it, I expect the Httpcfg.exe: HTTP Configuration Utility can be used to allow this on earlier versions of Windows (XP, Server 2003).

Martin Hollingsworth
  • 7,249
  • 7
  • 49
  • 51
  • 2
    Also note that if you are using a non-english version of Windows, some groups or reserved names are localised. For exemple, user=everyone on a french windows become user='Tout le monde' – Sebastien F. Mar 30 '13 at 08:56
34

See here for what requires admin access and what doesn't, depending on what you are doing with IIS Express: http://learn.iis.net/page.aspx/1003/running-iis-express-without-administrative-privileges/

Administrative privileges are required in order to perform the following tasks:

* Use a reserved port such as 80 or 443.
* Serve requests for external traffic.
* Configure a custom SSL certificate.
* Run SSL using a port outside the range of 44300 to 44399. 

So if you are doing any of the above, admin access will be required.

This is irrespective of 7 or 7.5.

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • IIS Express, Windows 8 Pro. Error description: Access is denied. (0x80070005) And it's a vanilla MVC4 "internet" site, not doing any of the above. I'll post a link if I get a solution. – Roger Willcocks Nov 30 '12 at 09:21
  • 1
    Got it. After re-reading the log, it's trying to do http://:67887/ as well as http://localhost – Roger Willcocks Nov 30 '12 at 09:37
  • 1
    Have to laugh at coming across my brother having the same error messages three years before me! *fistbump Roger* – Donnelle Dec 21 '15 at 19:48
  • ARG! The problem was the PORT NUMBER! I was using 54237 for HTTPS. that is so dumb. Thank you. – redwards510 Jan 29 '16 at 18:31
0

open CMD as administrator and run bellow statement

netsh http add iplisten ipaddress=::