views:

117

answers:

1

I've created a WebService Proxy from a given URL, but at runtime a need to change this URL depending of some conditions.

How to do it?

I've searched on the web and founded that I should change the "Url" property. But, some how, this property isn't exposed in my proxy class.

I am using Visual Studio .NET 2008

+1  A: 

If you are talking about the "classic" SOAP web service proxy (created like this: http://alexduggleby.com/2008/08/24/add-web-reference-instead-of-service-reference-in-visual-studio-2008/), it really has an URL property.

If you are using Service references as in "new" WCF web services, take a look at this SO post: http://stackoverflow.com/questions/1193124/how-to-consume-wcf-web-service-through-url-at-run-time

naivists