views:

41

answers:

1

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.

A: 

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.

John Saunders