[英]Access IIS Dev. Server from Virtual Machine
I am running Visual Studio on my local Windows Server webdev machine. 我在本地Windows Server Webdev计算机上运行Visual Studio。 This launches an ASP.NET Development Server when I run my website. 当我运行网站时,这将启动ASP.NET开发服务器。
I need to test this in various versions/browsers/tools and thus I'd like to access it from a VM, without having to deploy it each time I want to test something. 我需要在各种版本/浏览器/工具中对此进行测试,因此我想从VM访问它,而不必在每次要测试某些东西时都进行部署。
Therefore: is there a way to access my local ASP.NET server from my VM? 因此:有没有办法从我的VM访问我的本地ASP.NET服务器?
Can I use a reverse proxy or something for this? 我可以为此使用反向代理吗? If so how? 如果可以,怎么办? Why can I access the IIS7 welcome page but not the instance of my webserver on specific port? 为什么我可以访问IIS7欢迎页面,但不能访问特定端口上的Web服务器实例?
Cheers 干杯
Edited to differentiate Cassini ASP.NET Dev. 编辑以区分Cassini ASP.NET Dev。 Server and IIS7. 服务器和IIS7。
I found a way to do this using Fiddler. 我找到了一种使用Fiddler做到这一点的方法。
Basically you just create a reverse proxy on the dev. 基本上,您只是在开发人员上创建反向代理。 machine like so: 像这样的机器:
if (oSession.host.toLowerCase() == "192.168.0.100:8888") oSession.host = "localhost:41111"; 如果(oSession.host.toLowerCase()==“ 192.168.0.100:8888”)oSession.host =“ localhost:41111”;
Where my ASP.NET dev server (from VS2010) is running on localhost:41111 and I access it from other machines on the local network (or VMs) using 192.168.0.100:8888 (mydevhostip:8888) in a browser. 我的ASP.NET开发服务器(来自VS2010)在localhost:41111上运行,并且在浏览器中使用192.168.0.100:8888(mydevhostip:8888)从本地网络(或VM)上的其他计算机访问它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.