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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:15:02+00:00 2026-06-01T05:15:02+00:00

I have two solutions, one is a class library and the other is a

  • 0

I have two solutions, one is a class library and the other is a web application, and I want to get the connection string from the web.config file to the class library as I am developing a custom membership provider. I am using Framework 4.0 and MS Visual Studio 2010.

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-01T05:15:03+00:00Added an answer on June 1, 2026 at 5:15 am

    You can put the configuration settings for any library in the main web.config. It’s easy!

    Connection strings are especially easy. Just add your connection string to the connectionstrings section with the same name it has in the library’s app.config, and you’re done!

    <connectionStrings>
        <add name="Sitefinity" connectionString="your connection string"/>
    </connectionStrings>
    

    To add configuration settings, at the top of your web config, find the applicationSettings section, and add your section’s info. Note: be sure to set your library’s settings access modifier to “Public”. You can do this in the Properties ui.

    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="Your.Assembly" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
    

    Then, add the section under applicationSettings.

    <applicationSettings>
    <Your.Assembly>
      <setting name="TestSetting" serializeAs="String">
        <value>a test value</value>
      </setting>
    </Your.Assembly>
    </applicationSettings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two VS2008 solutions. Both contain a web application. For both web apps
I have two projects in the same solution, VS2k10. One is a class library,
I have a solution that contains two projects. One project is an ASP.NET Web
I have an solution in VS 2008 which contains two class library projects and
I have a Class Library project which houses some shared code between other projects
I have two projects in my Solution. One implements my business logic and has
I have a solution with two projects. One for project for the production code
I have three solutions which build two clients and a server, and share many
Suppose my solution have two project: myApp: silverlight application project: the default application App
I have two projects in my solution   1- asp.net web project.   2-

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.