我们可以允许从外部访问Visual Studio中的虚拟Web服务器吗? [英] Can we allow Virtual Web Server in Visual Studio to be accessed from outside?

查看:86
本文介绍了我们可以允许从外部访问Visual Studio中的虚拟Web服务器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行ASP.Net项目时,我在URL http://localhost:1974中看到.但是,如果将其更改为192.168.1.1:1974,则在我的PC和同一局域网中的其他PC上都找不到它.在这种情况下,我们可以将其配置为允许这种请求吗?

When I run my ASP.Net project, I see in the URL http://localhost:1974. But if I change it to 192.168.1.1:1974, it not found in both my PC and other PCs in the same LAN. In this case, could we configure it to allow this kind of request?

推荐答案

否:您需要安装并运行iis并创建您的网站,以便它是从iis内部运行的.然后,您的地址可能是http:\\ localhost \ name_of_site \.要从其他PC访问,您需要弄清楚PC的IP地址是什么-也许是192.168.1.1(尽管通常是路由器地址-PC可能是192.168.1.35或类似地址).如果您在局域网上,则可能会为您的PC取一个名称,在这种情况下,您可以使用http:\\ name_of_pc \ name_of_site \访问该站点.您在上面看到的地址仅在VS运行内部Web服务器时才有效.
No: you''d need to install and run iis and create your web site so that it runs from within iis. Your address might then be http:\\localhost\name_of_site\. To access from other pcs you''d need to figure out what the ip address of your pc is - perhaps it is 192.168.1.1 (though that is usually the router address - the pc might be 192.168.1.35 or similar). If you''re on a lan you may have a name for your pc in which case you could access the site as http:\\name_of_pc\name_of_site\. The address you''re seeing above is only good whilst VS is running the internal web server.


这篇关于我们可以允许从外部访问Visual Studio中的虚拟Web服务器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆