visual-studio - 无法从 IP 访问 Visual Studio 项目,只能访问 http ://localhost

标签 visual-studio virtual-machine

我正在 Visual Studio 中运行一个项目。我点击运行,它启动指向 http://localhost:1267 的 IE
如果我尝试访问 http://10.211.55.3:1267 (机器的IP),即使从同一台机器访问,我什么也得不到。 IIS7 工作正常。
这台机器实际上是一个并行运行的虚拟机。
任何想法可能会发生什么?

最佳答案

如果您使用的是 Visual Studio 开发服务器(而不是 IIS),您的服务器将只绑定(bind)到 localhost。您不能使用其他 IP 地址访问它。如果必须,可以work around this with proxies .

如果您正在运行 IIS,请确保您的 Web 服务器绑定(bind)到所有地址 (0.0.0.0)

关于visual-studio - 无法从 IP 访问 Visual Studio 项目,只能访问 http ://localhost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5901224/

相关文章:

localhost - 从 VirtualBox 虚拟机寻址本地主机

c - "no newline at end of file"C

C++ 奇怪的访问冲突 Visual Studio 2015 RC

git - 使用 git "inside"或 "outside"虚拟机?

visual-studio - 如何在 Visual Studio 中更改偶数行背景颜色?

c++ - Visual Studio C++ 中的/MD 和/DMD 有什么区别?

linux - 在 RAM 中运行 Vagrant VM 有哪些方法?

c# - 模拟鼠标/键盘事件到 Hyper-V 虚拟机

c++ - 线程执行顺序

c# - .Net 核心依赖 - Bower