H
hazz
I have spent more time than I care to admit trying to track down a very
subtle error.
Here is my app's xx.exe.config file.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appsettings>
<add key="PasswordProvider" value="fudge" />
</appsettings>
</configuration>
Here is the code which reads the xx.exe.config file generated from the
app.config;
string val= "test" ;
string key = "test";
try
{
string filename =
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
val=ConfigurationSettings.AppSettings[key];
}
catch(Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
Here is the exception;
+ ex {@"Unrecognized configuration section appsettings
(C:\Webconfig.exe.config line 3)" } System.Exception
*************************
any ideas? I am certain the config file is well formed. This is a test
project with no other code to complicate this test.
Is there any possibility that anything in the WinXP environment I inherited
could alter any of Visual Studio's runtime?
Any setting in VS.NET options? Machine.config setttings? I can't remember
how to tell WinXP Pro how to add the security tab to the folder options for
me to check the folder security settings....but from the error message, that
doesn't appear to be the problem.
Thank you!
-greg
subtle error.
Here is my app's xx.exe.config file.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appsettings>
<add key="PasswordProvider" value="fudge" />
</appsettings>
</configuration>
Here is the code which reads the xx.exe.config file generated from the
app.config;
string val= "test" ;
string key = "test";
try
{
string filename =
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
val=ConfigurationSettings.AppSettings[key];
}
catch(Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
Here is the exception;
+ ex {@"Unrecognized configuration section appsettings
(C:\Webconfig.exe.config line 3)" } System.Exception
*************************
any ideas? I am certain the config file is well formed. This is a test
project with no other code to complicate this test.
Is there any possibility that anything in the WinXP environment I inherited
could alter any of Visual Studio's runtime?
Any setting in VS.NET options? Machine.config setttings? I can't remember
how to tell WinXP Pro how to add the security tab to the folder options for
me to check the folder security settings....but from the error message, that
doesn't appear to be the problem.
Thank you!
-greg