Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7690241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:21:03+00:00 2026-05-31T20:21:03+00:00

I have a project that needs to be deployed on multiple servers. Its the

  • 0

I have a project that needs to be deployed on multiple servers. Its the same code, only the endpoints are different. Currently, I have to do the following steps:

1) Configure the service reference to point to the correct server
2) Comment out the current server, uncomment the next server (a local parameter for the binding):

//private string serverName = @"http://server1/service.asmx";
//private string serverName = @"http://server2/service.asmx";
//private string serverName = @"http://server3/service.asmx";
private string serverName = @"http://server4/service.asmx";
....

ServiceClass.ServiceClassSoapClient Mgr = new ServiceClass.ServiceClassSoapClient (basicHttpBinding, new EndpointAddress(serverName));

3) Rebuild
4) Publish

There are many (16) servers that I need to do this to, and it is taking a LONG time to manually do this to all of them. Is there a way to do this automatically?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:21:04+00:00Added an answer on May 31, 2026 at 8:21 pm

    If all you need to do is to store a string which is system-dependent, why not use the built in Application Settings? This stores data on a per-system (or per-user) basis in AppData which is accessible via the My.Settings object.

    http://msdn.microsoft.com/en-us/library/a65txexh.aspx

    http://msdn.microsoft.com/en-us/library/c9db58th.aspx

    For example, you would create a string type application setting called serverName and at run-time you could configure this from within your application by reading/writing to My.Settings.serverName. The value of My.Settings.serverName is then stored for each system independently and returns a value unique to that system (or user) depending on where your application is running and who is running it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that needs to be done using ASP.NET. Currently, I'm using
We currently have a project that consists of multiple applications as well as a
I have a Java project that needs a addon interface. I was thinking about
I'm working on a project that needs to have a list of weekdays. I
I'm working on a project that needs to have flexible authorization. What I mean
On the project I'm working on, we have a file with svn:needs-lock that's frequently
We have a big C++ project that's compiled as native unmanaged code. We need
I have the same ASP.NET WebService deployed 3 times under 3 different URI's configured
I have an ASP.Net web application that is deployed to a number of different
I have a project that is deployed to production as a windows service. However

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.