Click to See Complete Forum and Search --> : Change URL of a web service at runtime


kangolian
March 5th, 2003, 06:18 AM
Hi

I am developing a web service and testing it on my local PC.
I am also developing a "client" program that accesses this web service.
However, the web service will soon be transferred to our intranet server.
Is there a way to change the setting in the client program, on the fly, to point it to the web service running on the intranet server? Or will I have to recompile the client?

Thanks in advance!

kangolian
March 10th, 2003, 08:39 AM
After many hours of sifting through MSDN help, I finally stumbled across the solution:

' Declare an instance of the web service
Dim oWebSrvc As New n_intranet.Data()
' Tell it to use a different URL
oWebSrvc.Url = "http://www.newserver.com/newwebsrvice.asmx"

Why is it that something so simple can take days to figure out?