开发者

Web service URL being overwritten with localhost

开发者 https://www.devze.com 2022-12-30 14:04 出处:网络
I have a reference to a web service on a remote server like such... http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl

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开发者_JAVA百科 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消