app.config and a global config file in windows forms app

I created a DLL that in the app.config file I pointed to a global file out on a shared drive.  The dll's app.config is named DLLname.dll.config.  I assumed that the DLL would use this file to see what the settings are that are stored.  It seems that when I use the DLL in one of my applications, the code in the dll that I thought was using the dll's app.config, is using the actual applications app.config...

Before I had all of my db connections stored in the apps app.config, but I wanted to move them out to a global file that could be used by all of my apps.

This "global.config" works if I put the db connections in the file used by the application and where the application poonts, but doesn't work if I put them where the dll's dll.config file points...

Is the dll only going to take what the actual application is using and not the dll's config file?
LVL 12
rgn2121Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lazyberezovskyCommented:
dll uses configuration from application.
http://stackoverflow.com/questions/594298/c-dll-config-file

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgn2121Author Commented:
What about using the ConnectionStrings property of the configuration manager...
 <connectionStrings configSource="\\some_path.config">
  </connectionStrings>
This is the inner exception for the error that I get...
"The configSource attribute must be a relative physical path.
rgn2121Author Commented:
I can use the code below in my app.config and point to a global config file for the app, but I was trying to store all my db connections in one config file and access them from any application using the connectionStrings tags...here is my app.config file...
 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
  <connectionStrings configSource="\\mydomain.com\Apps\Common\GlobalConnections.config">
  </connectionStrings>
  <appSettings file="\\mydomain.com\Apps\Common\MyApp\Global.config">
  </appSettings>
</configuration>

Open in new window

rgn2121Author Commented:
Nevermind...found this along the way...
"It must refer to a file in the same directory or in a subdirectory as the configuration file."
 
I will go back to what I was doing...thanks for the help and link.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.