Hello,
I've fixed a problem that was happening in my application, but am wondering why it is happening. The problem is I can't get a value directly from the app.config file directly, such as:
Code:
dim objConnection as New SQLConnection(ConfigurationSettings.AppSettings("Connection String"))
...
I had to rework it as:
Code:
dim objKey as System.Collections.Specialized.NameValueCollection = ConfigurationSettings.AppSettings
dim objConnection as new SQLConnection(objKey.Get("Connection String"))
I don't know why I can't reference it as "ConfigurationSettings.AppSettings("Connection String")", because I didn't need to do it this way in my ASP.NET application... any ideas? Also, please note that I may not have spelled something correctly in my code samples. I did get it right in the code, but retyped it here.
Thanks,
Brian Mains