Solved

Problem reading user settings from config file

Posted on 2007-03-21
2
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
ID: 18764714
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
ID: 18764971
thank you!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

735 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