How to change the IP of a web service?

Discussion in 'ASP .Net Web Services' started by Gary Nelson, Oct 14, 2005.

  1. Gary Nelson

    Gary Nelson Guest

    I've seen a couple of explanations about this, but haven't really understood
    how to do it.

    The problem is this:

    I have one asp.net page that will access multiple web services.

    The web services are all the same one, just installed in different servers
    with different IPs.

    The web services have just one function.

    How can I go about changing the IP each time I make the call so that the web
    service of the server I designate is called?

    Thanks ahead of time,

    Gary
     
    Gary Nelson, Oct 14, 2005
    #1
    1. Advertising

  2. Gary Nelson

    Peter Kelcey Guest

    Gary,

    Set the URL property of the proxy to point to the location you want

    Public Sub Example()

    Dim webProxy as new localhost.webservice 'replace this with you
    actual proxy declaration
    webProxy.Url = "http://101.101.101.101/mywebservice.asmx"
    webProxy.MyWebMethod()
    webProxy.Url = "http://202.202.202.202/mywebservice.asmx"
    webProxy.MyWebMethod()

    End Sub

    Hope that helps.

    Peter Kelcey
     
    Peter Kelcey, Oct 14, 2005
    #2
    1. Advertising

  3. Gary Nelson

    Gary Nelson Guest

    Peter,

    Thanks for the quick reply, I'll give it a try.

    Gary

    "Peter Kelcey" <> wrote in message
    news:...
    > Gary,
    >
    > Set the URL property of the proxy to point to the location you want
    >
    > Public Sub Example()
    >
    > Dim webProxy as new localhost.webservice 'replace this with you
    > actual proxy declaration
    > webProxy.Url = "http://101.101.101.101/mywebservice.asmx"
    > webProxy.MyWebMethod()
    > webProxy.Url = "http://202.202.202.202/mywebservice.asmx"
    > webProxy.MyWebMethod()
    >
    > End Sub
    >
    > Hope that helps.
    >
    > Peter Kelcey
    >
     
    Gary Nelson, Oct 14, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hocho888
    Replies:
    1
    Views:
    685
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,326
    Michael Averstegge
    Jan 10, 2006
  3. Not Me
    Replies:
    1
    Views:
    3,230
    Not Me
    Jun 5, 2007
  4. Spam Catcher
    Replies:
    1
    Views:
    1,067
    John Saunders [MVP]
    Sep 3, 2007
  5. Leo Violette
    Replies:
    0
    Views:
    1,103
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page