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 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

Related Questions

Setup I have a website that draws RSS feeds and displays them on the
Setup Have you ever had the experience of going into a piece of code
Setup I have a VBScript for driving the stress testing of a web service.
I have setup web dav on windows server 2008. It seems to work fine
I've created some MbUnit Test Fixtures that have SetUp methods marked with the SetUp
Setup: I have an HTML page with a fieldset element. The background color of
I have setup a property and implement INotifyPropertyChanged like so... public event PropertyChangedEventHandler PropertyChanged;
Here's the setup I have in a vs2008 solution: Data layer in a project
At the moment I have setup a custom ok cancel dialog with a drop
I am trying to implement performance testing on ActiveMQ, so have setup a basic

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.