CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Location
    Bolton, UK
    Posts
    55

    Question Change URL of a web service at runtime

    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!

  2. #2
    Join Date
    Jun 2002
    Location
    Bolton, UK
    Posts
    55

    Talking Sorted!

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured