Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
Appconfig setting
Tanvir Huda
20y
4.2k
1
Reply
Hello Guys I am facing some problem with Appconfig setting I am using VS 2003 and write a config file and place it in BIN/Debug directory And according to the .Net architecture it should add the file when it starts for execution. the content of my prj.exe.config file is =================================================
==================================================== and i am trying to read it using the following codes. System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader(); UserID = ((string)(configurationAppSettings.GetValue("USERID", typeof(string)))); UserPassword = ((string)(configurationAppSettings.GetValue("USERPASSWORD", typeof(string)))); But the problem is when i run the program it gives an exception and says USERID cannot find. And deletes the config file. Can anyone pls tell me where is the problem . Thanks
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Extract icon from exe, dll, or ico file
mshflexgrids - setting the number of cols