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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:46:00+00:00 2026-05-21T12:46:00+00:00

In debug mode I have been using: ConnectionString = Properties.Settings.Default.SomeConnectionString to retrieve my connection

  • 0

In debug mode I have been using:

ConnectionString = Properties.Settings.Default.SomeConnectionString

to retrieve my connection string. However, this same code does not give me the connection string when running in release mode.

Note: SomeConnectionString is a connection string in a local Settings.settings file.

How can I use the same code above regardless of debug/release mode?

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-05-21T12:46:01+00:00Added an answer on May 21, 2026 at 12:46 pm

    Instead of using a Properties file to store the connection string, you should store the connection string in app.config if you can’t get access to the connection string in the web.config.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
         <connectionStrings>
            <add name="SomeConnectionString" 
            connectionString="Data Source=(local);Initial Catalog=Database;
            Persist Security Info=True;Integrated Security=SSPI;"                       
            providerName="System.Data.SqlClient" />
          <connectionStrings>
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an importer process which is running as a windows service (debug mode
I'm trying to debug an assembly that has been compiled in Release mode, so
Sometimes my c++ program crashes in debug mode, and what I got is a
Do C#/.NET floating point operations differ in precision between debug mode and release mode?
When I run my Visual Studio Windows Forms application by clicking F5 (debug mode),
I want to define some member variable and some code just in Debug Mode,
In most C or C++ environments, there is a debug mode and a release
Hitting debug will deploy the application to \program files\AppNamespace\AppName.exe and attach to it. However,
I have been trying to set up OpenCV for the past few days with
I have an EXE file using a DLL file which is using another DLL

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.