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 v开发者_开发技巧irtual 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?
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"];
精彩评论