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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:55:06+00:00 2026-06-03T16:55:06+00:00

I was wondering if people could post their solution to the ongoing problem of

  • 0

I was wondering if people could post their solution to the ongoing problem of local databases and different connectionstrings among many developers in one project within source control?

More specifically, I’m talking about the problem where a project that is in source control and has many developers with a local database each. Each developer has their own connection string (named instance, default instance, machine name, username, password, etc). Every check in overrides the previous version and pulling the latest version results in using someone else’s connection string.

So, people, which solution are you using for this problem? Extra points for explanations on why their solution works, pros, and cons.

EDIT
Keep in mind that this answer shouldn’t be targeted only to an enterprise environment where you have full control of the setup. The right solution should work for everyone: enterprise, startup, and open source devs.

Thanks!

  • 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-03T16:55:08+00:00Added an answer on June 3, 2026 at 4:55 pm

    To me, your question seems to imply one of two outcomes:

    1. A connection string is specified in the Web.config file that is generic enough to work for all local versions of the database. You’ve indicated that this isn’t an ideal setup in environments where you don’t have complete control.
    2. Each developer is required to supply his or her own connection string that is never checked into source control.

    A few others have already covered the first scenario. Use localhost and follow a convention for the database name. For option 2, I’d recommend specifying a config source that doesn’t get checked into source control:

    <configuration>
      <connectionStrings configSource="connectionStrings.config"/>
    </configuration>
    

    EDIT:

    connectionStrings.config

    <connectionStrings>
      <add name="Name" 
        providerName="System.Data.ProviderName" 
        connectionString="Valid Connection String;" />
    </connectionStrings>
    

    From: http://msdn.microsoft.com/en-us/library/ms254494(v=vs.80).aspx

    connectionStrings.config would be a file in the root of the project that you specifically excluded from source control. Each developer would be required to provide this file when working locally. Your production connection string could be substituted via a Web.config transformation on build / deployment.

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

Sidebar

Related Questions

I was wondering if people could post some examples of interesting websites and web
I was wondering if people could share their preferred approach for filtering the contents
I was wondering if people could post some examples of interesting websites and web
I'm wondering how people are currently resetting their data / cleaning up test remnants
I was wondering if people would share their best practices / strategies on handling
I was discussing this at work, and was wondering where people start their designs?
Im wondering if someone could help me. I have hundreds of people uploading images
Hello fellow Computer People! I could do this myself, but was just wondering if
I was wondering if anybody knows the total length that a post global could
I was wondering if some people could help, I have this code in my

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.