Learner
Learner

Reputation: 4751

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse

I have web services which I have hosted under the virtual directory named "TestServices". The client program has the web references added to it and those references point to the "TestServices" virtual directory in my development environment.

Our test environment is replica of the production and there virtual directory name is "ConfiguratorApplication". When I run the client exe on the test environment i get the exception mentioned in title. The correct url is mentioned in the application config file.

How to deal with such a scenario when virtual directory names may not match but you still add web references during developement or create proxy classed of the web services?

Upvotes: 1

Views: 1049

Answers (1)

Frédéric Hamidi
Frédéric Hamidi

Reputation: 263117

You can set the Url property of your proxy object to any location that implements the same service description as the original web reference:

yourClientProxy.Url = ConfigurationManager.AppSettings["yourUrlKeyInAppConfig"];

Upvotes: 1

Related Questions