使用IIS Express托管网站
我看到以前有人问过这个问题,但我还是没有得到答案。 我正在尝试从其他设备(而不是笔记本电脑)调用我的页面。我按照我已经在此处阅读的说明进行操作,以下是我的步骤: 1) 我通过以下命令更改了“applicationhost”文件中的行:使用IIS Express托管网站,iis,localhost,webmatrix,Iis,Localhost,Webmatrix,我看到以前有人问过这个问题,但我还是没有得到答案。 我正在尝试从其他设备(而不是笔记本电脑)调用我的页面。我按照我已经在此处阅读的说明进行操作,以下是我的步骤: 1) 我通过以下命令更改了“applicationhost”文件中的行: netsh http add urlacl url=http://localhost:80/ user=everyone 然后: netsh http add urlacl url=http://stephanmaimon:8080/ user=everyon
netsh http add urlacl url=http://localhost:80/ user=everyone
然后:
netsh http add urlacl url=http://stephanmaimon:8080/ user=everyone
现在我的“applicationhost”文件如下所示:
<sites>
<site name="WebSite1" id="1" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8080:stephanmaimon" />
</bindings>
</site>
<site name="EmptySite" id="2">
<application path="/">
<virtualDirectory path="/" physicalPath="C:\Users\Stephan Maimon\Documents\My Web Sites\EmptySite" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:55436:stephanmaimon" />
</bindings>
</site>
,但当我按“run”时
我得到这个错误-
无法启动网站,因为绑定到主机名或端口需要管理权限。
建议:
1.将“主机名”替换为“本地主机”
现在我卡住了。。。。
请帮助我,谢谢我现在在Visual Studio 2015 RC和Windows 10中遇到了这个问题。我现在唯一的解决方法是在管理员模式下运行VisualStudio,因此您可以尝试在管理员模式下运行WebMatrix。我不是每次创业都要这么做的粉丝,但如果你还没有这样做的话,我希望这至少能让你振作起来。如果你已经让它运行了,你做了什么?