I have a client VB .NET 3.5 WPF app which is basically a test harness – it calls a webservice (a classic .NET 2.0 webservice, NOT a WCF app) that’s in the same solution. to check some of the service methods runs correctly.
I’ve added the service to the the client project in VS as a Service Reference, and set the solution for both projects to be startup projects. That works fine when I’m debugging and running the whole thing locally. But the problem is, I need the user to be able to type in a URL at runtime, and have the test harness check out the service at the specified URL, not the one at the location that VS is running. This is so the test harness can check out already deployed copies of the web service. The problem is there doesn’t seem to be any way in the service reference to make the URL dynamic and settable from the VB code. Is it possible to do that?
I think you can dynamic point client to service. The service reference is a proxy of your service.
I belive that you can use the other constructor of service reference(service proxy) that take a Url as parameter.
e.g. YourServiceProxy(“Target url”)
If you user change/edit the service url, i think you can initail other service proxy instance that take url which user specify.