TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
clr
NA
1
0
Application configuration file for C# class library
Dec 27 2004 11:27 AM
Hi all, I'm building a library of C# classes to drive my website, and I'd like to keep a string in an application configuration file. In my class I'm using the following code... private string dbString = System.Configuration.ConfigurationSettings.AppSettings["fooKey"]; ...which is supposed to grab its value from the "[appname].config" file in my C# class library, which contains the following:
However, when I step through the code using a test harness I see that my string value remains null after the line of code above is run. Any idea why this might be failing? I notice my [appname].config file isn't being copied to \bin\debug when I run the project, and I tried copying it there myself, but to no avail. I've also noticed that all the instructions I can find for working with app config files are for .exe projects or asp.net apps, not for class libraries -- I wonder if there's something one needs to do differently here? Thanks!
Reply
Answers (
1
)
VB.NET Memory Management
The best buffer size for transfering file