Refering to alternate web service should one not be available

Posted on 2004-11-29
Last Modified: 2010-04-23

Hi all

I am writing a system which a frint end vb .net program access and uses a web service on a local web server. But if that web server is not availbale then i need the program to be able to dynamically( or be done with user interaction) point to another (copy of web service) on another web server in house

I think this can be done but anyone any tips on how to go about this


Question by:davoman
    LVL 3

    Expert Comment

    Change the url in the proxy, as long as the two web services are identical should be sweet
    LVL 1

    Author Comment

    Can you do that programmatically
    LVL 3

    Accepted Solution

    'In your proxy ... make it accept the Url as a parameter
    public Sub New(Byval Url as String)
          Me.Url = Url; ' "http://localhost/YourWebService1.asmx"
    End Sub

    ' ... in code:
    Dim Server as YourWebServiceProxy
          Server = new YourWebServiceProxy("http://localhost/YourWebService1.asmx")
          ' ...
    catch (byval e as Exception)
          Server = new YourWebServiceProxy("http://localhost/YourWebService2.asmx")
          ' ...
    End Try
    LVL 1

    Author Comment

    Just the job thanks

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now