jdi*_*iaz 106 asp.net iis-express
是否可以使用IIS Express来托管网络上的页面.开箱即用它可以做localhost但我试图将它绑定到IP地址.
vik*_*all 107
我想你可以.
为此,您需要applicationhost.config手动编辑文件(编辑bindingInformation' <ip-address>:<port>:<host-name>')
要启动iisexpress,您需要管理员权限
小智 87
为了让IIS Express能够接听任何IP地址,只需将地址留空,即:
bindingInformation=":8080:"
Run Code Online (Sandbox Code Playgroud)
在发生更改之前,请不要忘记重新启动IIS Express.
Dav*_*row 35
如上所述,编辑应用程序host.config.找到这个的简单方法是使用IIS Express在VS中运行您的站点.右键单击系统托盘图标,显示所有应用程序.选择您的站点,然后单击底部的配置链接将其打开.
我建议添加另一个绑定条目,并将初始localhost保留在那里.此附加绑定将作为站点下的单独应用程序显示在IIS Express系统中.
为了避免必须以管理员身份运行VS(很多理由不以管理员身份运行),请按如下方式添加netsh规则(显然用您的值替换IP和端口) - 您需要一个admin cmd.exe,它只需要运行一次:
netsh http add urlacl url=http://192.168.1.121:51652/ user=\Everyone
Run Code Online (Sandbox Code Playgroud)
netsh可以添加像url = http:// +:51652 /这样的规则,但是我没能把它与IIS Express很好地放在一起.您可以使用netsh http show urlacl列出现有规则,并可以使用它们删除它们netsh http delete urlacl url=blah.
更多信息:http://msdn.microsoft.com/en-us/library/ms733768.aspx
Tho*_*att 11
以下是使用IIS Express运行我的x64位IIS应用程序所需进行的完整更改,以便远程主机可以访问它:
iisexpress /config:"C:\Users\test-user\Documents\IISExpress\config\applicationhost.config" /site:MyWebSite
Starting IIS Express ...
Successfully registered URL "http://192.168.2.133:8080/" for site "MyWebSite" application "/"
Registration completed for site "MyWebSite"
IIS Express is running.
Enter 'Q' to stop IIS Express
Run Code Online (Sandbox Code Playgroud)
配置文件(applicationhost.config)的部分添加如下:
<sites>
<site name="MyWebsite" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\build\trunk\MyWebsite" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":8080:192.168.2.133" />
</bindings>
</site>
Run Code Online (Sandbox Code Playgroud)
可以按如下方式启用64位版本的.NET框架:
<globalModules>
<!--
<add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
-->
<add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
122985 次 |
| 最近记录: |