Web 服务 URL 被 localhost 覆盖
我有一个像这样的远程服务器上的 Web 服务的引用...
http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl
当我调用 Web 服务并查看其 URL 属性时,它看起来像...
http://localhost/PersonifyWebServicePPROD/UniversalWebService/default.asmx
谁能告诉我为什么它用 localhost 覆盖远程服务器?提供 Web 服务的供应商说我必须引用 wsdl 而不是 asmx 才能使其正常工作。我尝试在 IIS 中运行它并作为文件系统上的 Web 应用程序运行它,但这两种情况都不起作用。这是在 .Net 3.5 框架上。
I have a reference to a web service on a remote server like such...
http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl
The moment I invoke the web service and view its URL property it looks like...
http://localhost/PersonifyWebServicePPROD/UniversalWebService/default.asmx
Can anyone tell me why it's overwriting the remote server with localhost? The vendor that provided the web service said I have to reference the wsdl and not the asmx in order for it to work. I've tried running it both within IIS and as a web app on the filesystem and neither scenario work. This is on the .Net 3.5 framework.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于这是旧版 ASMX Web 服务,因此由 IIS 托管。 IIS 确定它认为服务所在的 URL。查看托管服务的站点的 IIS 配置。特别是,查看是否设置了主机标头。
Since this is a legacy ASMX web service, it is hosted by IIS. IIS determines the URL it thinks the service is at. Look at the IIS configuration for the site where the service is hosted. In particular, look to see if a host header is set.