在本地网络中使用Visual Studio Web服务器 [英] Use Visual Studio web server in local network
问题描述
是否可以从共享同一路由器的另一台计算机访问Visual Studio Web服务器?我尝试连接到IP地址,但没有成功. VS中有设置吗?还是防火墙?
Is there a way to access visual studio web server from another computer that share the same router? I tried connecting to the IP address but it didnt work. Is there a setting in VS? or firewall?
推荐答案
您可以通过安装IIS Express来实现. 转到
You can achieve this by installing IIS Express. Go to
http://www.microsoft.com/zh-我们/download/details.aspx?id=1038
安装后,将项目设置更改为此:
Once installed, change your project setting to this:
然后转到
%userprofile%\ Documents \ IISExpress \ config \ applicationhost.config
%userprofile%\Documents\IISExpress\config\applicationhost.config
,对于项目,请更改其绑定:
and for the project change the binding to this:
<bindings>
<binding protocol="http" bindingInformation=":54715:" />
</bindings>
注意,如果您只想将其限制为IP和计算机名称,则也可以指定这样的绑定:
Note, you can also specify the bindings like this if you just want to limit it to your IP and machine name:
<binding protocol="http" bindingInformation="*:54715:localhost" />
<binding protocol="http" bindingInformation="*:54715:anishaalaptop" />
我使用我的android应用通过Wifi调试应用,因此我将绑定保持打开状态.
I debug my app over Wifi using my android app so I leave the binding open.
这篇关于在本地网络中使用Visual Studio Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!