Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need Help Refactoring please.

Posted on 2015-02-21
5
Medium Priority
?
48 Views
Last Modified: 2015-03-05
I need help with my authentication dll.  I am trying to read settings from the authenication.config inside the class library.  I am trying to write a strategy pattern to access different authenticatons methods, whether I want to use AD, Database, and etc.  Can someone please help me.

its located on my google drive.
https://drive.google.com/file/d/0B6LKujct8rieRXpjc1ZMbm13TTA/view?usp=sharing
0
Comment
Question by:cbrune
  • 2
  • 2
5 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40623747
Do you have a specific question?
0
 

Author Comment

by:cbrune
ID: 40623762
I can't grab the app settings from authentication.config in the authentication config settings.. How do I?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40623775
You put app settings in your main configuration file--i.e. the one that goes with the main executable. The configuration system doesn't read anything but that, even if you include additional configs. You can manually read the config, but it's usually easier/quicker to just include the settings in the main config.
0
 

Author Comment

by:cbrune
ID: 40623777
But how do I have a secondary config and read files from there??
0
 
LVL 12

Accepted Solution

by:
FarWest earned 2000 total points
ID: 40623844
as said, configuration will be the one of your main executable
but still you can read other assemblies config files
 this sample uses OpenMappedExeConfiguration is to open other configuration files
var configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = "AssemblyName.dll.config";
var section = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None).GetSection(sectionName);

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question