重新路由网络请求的代理
在本地开发计算机上运行 ASP.NET Web 应用程序时,例如 http://devmachine:1234,我想从使用不同浏览器的虚拟电脑连接到该计算机。据我所知,开发网络服务器仅为本地计算机提供流量。
是否有一个程序/代理可以在我的本地开发计算机上运行,该程序/代理将侦听来自虚拟 PC 浏览器的传入连接并将它们重定向到本地计算机上的开发网络服务器?
例如,虚拟 PC 浏览器通过代理连接到本地 PC 端口 8080,然后将其传递到 devmachine 端口 1234
When running an ASP.NET web application on a local development machine, e.g. http://devmachine:1234, I would like to connect to that machine from a virtual pc that uses different browsers. As far as I know the development webserver only serves traffic for the local machine.
Is there a program / proxy that I can run on my local development machine that will listen for incoming connections from the virtual pc's browser and redirect them to the development webserver on my local machine?
e.g. virtual pc browser connect via proxy to local pc port 8080, then passes it on to devmachine port 1234
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出于这个原因,我倾向于避免将 Casini 用于除了最简单的示例或概念验证网站之外的所有网站。
您最好使用 IIS 本身,而不是 Casini/ASP.NET Web 开发服务器。
使用与本地开发文件相同的物理路径在 IIS 中创建网站或虚拟目录。这样,您就可以通过您的 IP 地址从任何计算机进行连接,并且该站点将通过已知地址始终可用,而不是通过不同的端口偶尔可用(即当您运行 Casini 时)。
I tend to avoid using Casini for all but the most trivial example or proof-of-concept sites for this reason.
You're better off using IIS-proper rather than Casini/ASP.NET web development server.
Create either a web site or a virtual directory in IIS with the physical path that's the same as your local development files. This way you'll be able to connect from any machine via your IP address and the site will be consistently available via a known address rather than sporadically available (i.e. when you have Casini running) via a port that varies.