Solved

Need Help Refactoring please.

Posted on 2015-02-21
5
39 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 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

772 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