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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:24:05+00:00 2026-05-28T19:24:05+00:00

I just inherited a very old ASP.NET 2.0 web application. In the application it

  • 0

I just inherited a very old ASP.NET 2.0 web application.

In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1.

I always thought that a .DLL couldn’t have a app.config/setting.settings file (or at least you can include them but they won’t be used), so this is what is confusing to me.

The web.config also has a connection string named ConnString1 with the same server login credentials, but a different server name.

When I run the application from Visual Studio DEBUG, it uses the connection string that is located in the app.config/settings file, and not the one defined in the web.config/machine.config.

I thought .DLLs wouldn’t do this, but use the web.config instead?

However, when I pushed this application in RELEASE mode to our production server (in test website), it seems to be using the correct connection string in the web.config.

Can anyone explain this?

  • 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-28T19:24:06+00:00Added an answer on May 28, 2026 at 7:24 pm

    There’s got to be something that is confusing you to think that the config file that’s a part of that DLL is being used – as opposed to the applications (entry point’s) config file (yourapp.exe.config or web.config). Maybe that conn string is hard-coded somewhere for the use in debug mode, e.g. by using conditional compilation via “#if DEBUG” preprocessor directive (so, maybe search for “#if DEBUG” across your solution to see if this particular thing is happening).

    MSDN article about app settings

    See the yellow “Note” in the section “Creating Application Settings at Design Time”: “Because there is no configuration file model for class libraries, application settings do not apply for Class Library projects.”

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

Sidebar

Related Questions

I have just inherited an asp.net mvc 3 site operating on .net 4 which
I have inherited an ASP.net codebase and I have very limited ASP.net skills. I
I've just inherited a java application that needs to be installed as a service
I have just inherited a server application, however it seems that the only copy
I'm looking at some vb.net code I just inherited, and cannot fathom why the
I've inherited a web app that I've just discovered stores over 300,000 usernames/passwords in
Greetings! I inherited a C#.NET application I have been extending and improving for a
I inherited an application that used forms to POST data. I am not very
I've just inherited a project, and been told that an entire folder, includes/ needs
I've just inherited a large project previously coded by about 4-5 people. The documentation

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.