CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2011
    Posts
    1

    Question Change A Web Service

    I'd like my code to use a different web service depending on which server it's running on. The services are exactly the same, one is for the test version of an app, the other for live.

    Both services are defined as a Web Reference, one as TestService the other as LiveService however I'm not sure how to tell my code which one to use, depending whether it's on the Test or Live server.

    Can anyone help please?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Change A Web Service

    Presumably you are using an app config file (if you aren't then use one).

    Then when you deploy, you put the appropriate url in the app.config file.

Tags for this Thread

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