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

  • Home
  • SEARCH
  • 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 136549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:57:58+00:00 2026-05-11T06:57:58+00:00

The Setup: I have a DLL that uses a ConnectionString to connect to a

  • 0

The Setup:

I have a DLL that uses a ConnectionString to connect to a SQL database. When I add the DLL to my website i have to add the connectionstring into my web.config in order for my DLL to function properly (this is by design). Once I add it into the web.config then everything works fine (as expected).

The Problem:

The problem begins when I want to move the connectionstring into my Website’s ASP.NET Application settings found in IIS > Default Website > Properties > ASP.NET tab > Edit Global Configuration… > Connection string manager

If I remove it from my web.config and put it there my DLL fails to work. If I use the connectionstring anywhere else in my website (and not from a DLL) I can access the database just fine through this method but for some reason my DLL can only access it if it’s in the web.config.

The Question:

How can I get my DLL to use the connectionstring that’s listed in the ASP.NET Configuration Settings Connection String Manager instead of the web.config?

  • 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. 2026-05-11T06:57:58+00:00Added an answer on May 11, 2026 at 6:57 am

    You have to look for the section from the general ASP.Net configuration settings, which can be retrieved through the WebConfigurationManager class, rather than looking for a connection string via ConfigurationManager.ConnectionStrings.

        // Get the connectionStrings section. ConnectionStringsSection connectionStringsSection =     WebConfigurationManager.GetSection('connectionStrings')     as ConnectionStringsSection;  // Get the connectionStrings key,value pairs collection. ConnectionStringSettingsCollection connectionStrings =     connectionStringsSection.ConnectionStrings;  // Get the collection enumerator. IEnumerator connectionStringsEnum =     connectionStrings.GetEnumerator(); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 99k
  • Answers 99k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you are practical: Yes! It will avoid you double… May 11, 2026 at 7:42 pm
  • Editorial Team
    Editorial Team added an answer Rename your variables and the input parameter, they're ambiguous. This… May 11, 2026 at 7:42 pm
  • Editorial Team
    Editorial Team added an answer Assuming you know how to load the PDF in to… May 11, 2026 at 7:42 pm

Related Questions

This is my first question on StackOverflow.com and I'm not sure if this is
I have an application where it was requested that a friendly url be made
I've written a setup.py script for py2exe, generated an executable for my python GUI
I'm using boost for several C++ projects. I recently made a upgrade (1.33.1 to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.