Solved

Problem reading user settings from config file

Posted on 2007-03-21
2
181 Views
Last Modified: 2010-04-16
I have written a C# dll. I set some user settings in the project properties -> Settings tab.

There is a connection string setting that the dll is supposed to read out of the mydll.dll.config file at run time. However no matter what I try and do it seems that the dll does not read the connection string out of the file. I can change the connection string in the file manually, remove it or delete the .config file all together and it does not affect the dll in any way. The only way the connection string setting can be changed is to open the project and change it in the settings tab.

Can anyone tell me what I am doing wrong?

Thanks
0
Comment
Question by:asmyatt
2 Comments
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
Comment Utility
An application will not use separate config files for referenced dlls.  It will use the config file for the application (appname.exe.config).  The connection string muct be placed within this file to use the built-in configuration manager.
0
 
LVL 2

Author Comment

by:asmyatt
Comment Utility
thank you!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Launch Process with NOT as Administrator 15 65
Get String split 5 31
Why don't I see this table in EDMX file? 2 19
XML & .net 5 16
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now