如何在位于虚拟机上的项目中使用在本地主机上运行的 Web 服务?

发布于 2024-09-24 20:06:42 字数 426 浏览 0 评论 0原文

我正在我的开发盒上运行一个 Web 服务,我需要在主机(也称为开发盒)上运行的虚拟机中测试该 Web 服务。开发盒上的 Web 服务运行于:

http://localhost:8100/ws_name.asmx

从虚拟机我没有成功地尝试过类似的操作:

http://host_machine_ip/ws_name.asmx

http://host_machine_ip:8100/ws_name.asmx

//host_machine_ip /ws_name.asmx

//host_machine_ip:8100/ws_name.asmx

是否可以从我的虚拟机测试此 Web 服务?

I am running a webservice on my development box and I need to test that webservice in a virtual machine that is running on the host(aka the development box). The webservice on the dev box is running at:

http://localhost:8100/ws_name.asmx.

From the VM I have unsuccessfully tried things like:

http://host_machine_ip/ws_name.asmx

http://host_machine_ip:8100/ws_name.asmx

//host_machine_ip/ws_name.asmx

//host_machine_ip:8100/ws_name.asmx

Is it possible to test this webservice from my VM?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丑丑阿 2024-10-01 20:06:42

如果您在 Visual Studio 的内置 Web 服务器中运行此服务,请记住此服务器不接受远程连接。因此,您需要将其托管在 IIS 中。

If you are running this service in the Visual Studio's built-in web server bear in mind that this server doesn't accept remote connections. So you will need to host it in IIS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文