Running IIS Express without administrator rights

空扰寡人 提交于 2019-11-29 21:25:55

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.

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).

open CMD as administrator and run bellow statement

netsh http add iplisten ipaddress=::

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!