我在家里有visual studio 2010,并开发了一个web应用程序。我现在在另一个位置的另一台计算机上。我只有U盘上的项目文件夹,而这台计算机上安装的都是IIS express。有没有办法让我的web应用程序正常运行?
发布于 2011-03-28 14:52:12
假设您在项目文件夹中具有运行web应用程序所需的所有文件,您应该能够在IIS Express中创建站点并启动它。
下面是您可能需要添加到IIS Express配置文件中的内容。该文件通常位于"C:\Users\Documents\IISExpress\config\applicationhost.config".中
在下面,您需要更改网站的路径,并确保正确绑定到该网站。如果端口号与您要保留的任何其他网站冲突,则可能需要更改端口号。
<sites>
<site name="MyWebsite" id="1" serverAutoStart="false">
<application path="/">
<virtualDirectory path="/" physicalPath="<USB Drive>:\<FolderToMyWebsite>" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":8080:localhost" />
</bindings>
</site>
<sites>发布于 2013-11-13 01:49:09
我也有同样的问题,我用下面的方法解决了它:
示例: port = 1111
local_ip_address = 192.168.1.1 -存储网页的本网ip地址
步骤1:
netsh http add urlacl url=http://local_ip_address:port/ user=Everyone第2步:
<bindings>
<binding protocol="http" bindingInformation="*:port:localhost" />
<binding protocol="http" bindingInformation="local_ip_address:port:" />
</bindings>第3步:
netsh advfirewall firewall add rule name="IIS Express (non-SSL)" action=allow protocol=TCP dir=in localport=port在评论中找到解决方案:http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx
https://stackoverflow.com/questions/5455434
复制相似问题