如何动态更改Web服务链接?

发布于 2025-01-08 10:12:48 字数 325 浏览 3 评论 0原文

由于我们在本地工作,因此我们的服务链接是: http://localhost:8012/webservice.asmx

当我们在我们的服务上部署Web服务,我们必须删除本地Web服务,然后再次添加Web服务链接,例如: http://test.com/webservice.asmx

删除Web服务引用并重新添加并不方便。有什么优雅的解决方案吗?

As we are working locally so our service link is: http://localhost:8012/webservice.asmx

When we deploy the webservice on our service, we have to remove the local web service and then add the web service link again for example: http://test.com/webservice.asmx.

It is not convenient to remove the web service reference and add it again. Is there any elegant solution?

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

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

发布评论

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

评论(1

千纸鹤带着心事 2025-01-15 10:12:48
YourService service = new YourService();
service.Url = "http://some.other.url/";
YourService service = new YourService();
service.Url = "http://some.other.url/";
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文