|
-
Mar 16th, 2005, 10:40 PM
#1
Thread Starter
Hyperactive Member
Configuration problem
Hi,
I have a VB.NET app that use .NET Remoting. So I create a <app>.exe.config file to store the URI. In addition, I also store some <appSettings> in it.
In my client code, I use
ConfigurationSettings.AppSettings.Item("xxx")
The config file is in the same folder as solution, and I also copy one to the \bin folder.
My problem is:
1. Is the config file defaults to <app>.exe.config? As I don't need to specify filename when using ConfigurationSettings.
2. When I run in VS.NET, AppSettings.Item() can't return a value, it is strange that the .config file in \bin folder is deleted automatically!! Since I don't need to specify filename, I cannot redirect it to get the config file from solution folder. If I double click the exe in \bin folder to run, no problem at all.
3. If I change the config file to other name (e.g. app.config), ConfigurationSettings can still get the key-value I specify, and it won't be deleted when I run in VS.NET. So what is the correct way to use config file and where should I put it during design and run time?
Thx!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|