Is it possible to change WebReference properties at runtime?

I am trying to find such a solution that the user will enter the URL of the web service and it will be tested.

Although I want to change the URL, I guarantee that the description of the service will always be the same (except for the wsdl: service tag, which contains a soap address); I just want to test different clients using the same service.

+7
c # visual-studio asmx web-reference
source share
2 answers

Yes, you can. just change the url property of the service proxy before calling any methods on it.

+7
source share

Yes; each web service proxy offers a way to do this; with pre-WCF proxies (including WSEx), the address is a property of Url in the proxy class - just change it before doing anything interesting with the proxy server.

With WCF, I believe that you specify the endpoint address through one of the constructors.

So, just generate your proxy server from your wsdl link and you leave; -p

+3
source share

All Articles