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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:36:01+00:00 2026-05-11T14:36:01+00:00

Configuration settings in 3.5 is driving me nuts… Help! ;) I have a class

  • 0

Configuration settings in 3.5 is driving me nuts… Help! 😉

I have a class library (Named ADI), that needs some configuration settings from the project using it (like connectionstring, filesystem locations etc).

I want to define these settings in my Windows Forms/Web Projects App.Config or Web.Config, like other settings.

Here is part of my app.config for my windows forms application:

<applicationSettings>     <PhotoImportRobot.My.MySettings>       <setting name='ADIImageRoot' serializeAs='String'>         <value>C:\DataTemp\ADI\Original\</value>       </setting>       <setting name='ADIImageVariantsRoot' serializeAs='String'>         <value>C:\DataTemp\ADI\Variants\</value>       </setting>     </PhotoImportRobot.My.MySettings> </applicationSettings> 

How do I access that from my class library??

I tried this:

System.Configuration.ConfigurationManager.AppSettings('ADIImageVariantsRoot') 

What to do?

  • 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-11T14:36:02+00:00Added an answer on May 11, 2026 at 2:36 pm

    If you’re not after structured settings, the appSettings section just takes key-value pairs:

    <appSettings>   <add key='ADIImageRoot' value='C:\DataTemp\ADI\Original\' />   <add key='ADIImageVariantsRoot' value='C:\DataTemp\ADI\Variants\' /> </appSettings> 

    This will enable you to access them via the AppSettings dictionary:

    ConfigurationManager.AppSettings['ADIImageVariantsRoot'] 

    As you would expect.

    Alternatively, if you need more structure to your configuration (i.e. more than just strings, or a collection of settings), you can look into using a configuration section of your own, using a ConfigurationSection, and its relevant parts.

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

Sidebar

Related Questions

I have a dynamic class that serves as a storage container for configuration settings.
What WCF configuration settings makes WCF service, so that I can access as old
I have set up some custom symfony project-level settings in the file config/project.yml following
Notice these two RedHat Linux system configuration settings: $ getconf GNU_LIBC_VERSION glibc 2.3.4 $
The web applications I develop often require co-dependent configuration settings and there are also
In .net frameworks 1.1, I use System.Configuration.ConfigurationSettings.AppSettings[name]; for application settings. But in .Net 2.0,
When Windows Internet Properties -> Connections -> LAN Settings -> Automatic Configuration is set
In a .NET project, say you have a configuration setting - like a connection
what configuration needs to be tweaked, and where does it live, in order to
I need to pass configuration settings to an AddIn created using the Managed AddIn

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.