访问 asp.虚拟机外部的.net开发服务器
伙计们,几个小时以来我一直用头撞桌子(而不是电脑)。我在并行虚拟机中运行 VS 2008。如果使用本地主机,我可以访问虚拟机中的开发服务器,如果我使用虚拟机的指定IP或尝试从外部访问它,则不起作用。所有防火墙均已关闭,并且我验证可以从外部访问 iis。
有什么想法可能是错的吗?
Guys, been knocking my head against the desk (instead of the mac) for hours. I'm running VS 2008 in a parallels VM. I can access the development server in the VM if local host is used, if I use the designated ip for the VM or try to access it externally it does not work. All firewalls are off and I verified that I can access iis externally.
Any Ideas what could be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我遇到了同样的问题,并且正在使用 TCP 隧道来绕过它。下载这个 Java 应用程序只需将流量引回即可。无需搞乱 IIS!
http://jcbserver.uwaterloo.ca/cs436/software/tgui/tcpTunnelGUI.shtml
在命令提示符中,您可以像这样运行 java 应用程序...假设您希望在端口 80 上进行外部访问,并且标准调试环境在端口 1088 上运行...
I ran into this same problem and am using a TCP tunnel to bypass it. Download this Java app & just tunnel the traffic back. No messing with IIS necessary!
http://jcbserver.uwaterloo.ca/cs436/software/tgui/tcpTunnelGUI.shtml
In command prompt, you'd then run the java app like this... Let's assume you want external access on port 80 and your standard debug environment runs on port 1088...
是的,它是 设计。考虑改用 IIS。
Yes, it is by design. Consider using IIS instead.
第一个答案是你不能这样做,因为开发服务器是专门为本地运行而设计的,否则会产生安全风险。
第二个答案是你可以解决任何问题, 这暗示有一种方法可以使用反向代理来做到这一点(但他链接到的帖子似乎已经死了)
The first answer is that you can't do it because the development server is specifically made to just run locally, otherwise it becomes a security risk.
The second answer is that you can get around anything, this hints that there is a way to do it using a reverse-proxy (but the post he links to seems to be dead)
编辑:查看RichardOD的答案后,我担心我下面的答案是错误的,你无法使用IP访问它。
但我建议您将其部署到 IIS。
VS2008 内部 Web 服务器(我猜是 cassini )为您的应用程序创建一个端口,并在该端口上为您的应用程序运行一个 Web 服务器。如果你想从机器外部访问它,除了 IP 之外,你还必须使用该端口。
EDIT : After viewing RichardOD's answer, I fear that my answer below is wrong and you can not access it using IP.
But I suggest you to go with deploying it to IIS.
The VS2008 internal web server ( which I guess is cassini ) creates a port for your app and runs a web server for your app on that port. If you want to access it from outside the machine you have to use that port in addition to IP.