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 9132667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:21:05+00:00 2026-06-17T08:21:05+00:00

Context We have developed the application from end-to-end using .NET Stack. So, let’s say

  • 0

Context

We have developed the application from end-to-end using .NET Stack. So, let’s say we are managing something like this:

WPF Client <=> Web Service:

  1. Development) Plain reference (direct calls to the WCF Service project inside VS, not deployed in IIS)
  2. Production) Remote Web Service [IIS @ remote server, need VPN to connect]

Web Service <=> Database:

  1. Development) SQL Server Express local DB [@ development machine]
  2. Production) SQL Server DB [@ production server, same as WS]

Notice that I’ve implemented it “The manual way, the right way” (http://www.code-magazine.com/Article.aspx?quickid=0809101). Hence, separate contracts / client proxies and so on …

Question

How could I get a set-up like described before in an elegant way? I mean, the web service <=> database it’s trivial, since I can use the web.config transformations in order to switch the connection string between debug & release. But, how can I automatically switch the “connection” from the client app to the Web Service?

In production I’m using a reference to the proxies, and describing an end-point in the app.config file. I guess that in development I would just need a plain reference to the web service itself. [Should I add/remove references between debug/release configurations? If yes, how could this be achieved programatically? … I’m completely lost].

Thank you for your time guys! 😉

EDIT:

As @AlexanderBalte suggests, the development behavior is just a direct call of methods. I don’t have an app server in the main development machine.

  • 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-06-17T08:21:06+00:00Added an answer on June 17, 2026 at 8:21 am

    Just like prthrokz, commented, we just switch endpoints. Using conditional compilation symbols is about as simple as possible (but no simpler):

        WCFServiceClient client = new WCFServiceClient();
    #if DEBUG
        client.Endpoint.Address = new EndpointAddress(new Uri("http://devSrv/WCFService.svc"));
        client.Endpoint.Name = "Dev";
    #else
        client.Endpoint.Address = new EndpointAddress(new Uri("http://prodSrv/WCFService.svc"));
        client.Endpoint.Name = "Prod";
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a fairly small asp.net MVC application using the repository pattern and
I have a very nice MVC Beta application developed using VS2008 on a win2008
Let's say I have an existing application written in Java which I wish to
Scenario : I have an ASP.NET MVC application developed in Visual Studio 2008. There
I have developed a windows application, which will read updated data from .jrn files(In
I have developed a simple contacts application and also implemented search using name. But
I have developed a set of apis that live on an asp.net mvc application,
Well, I have developed a java application using several objects relationships that make the
When developing a web application using ASP.NET, do you have any hints about how
I have web application using SpringFramework3.0.3.RELEASE, developed in Eclipse with m2eclipse plugin and deployed

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.