I am trying to access the appsettings key value in my vb.net 2.0 web application.
I put the key in the app.config file:
<appSettings> <add key="DownloadURL" value="http://<myURL>/" /> </appSettings>
I followed the instructions here , and he says that I need to access this key as follows:
URL = System.Configuration.ConfigurationSettings.AppSettings("DownloadURL")
But I get the following message:
The general property of Shared Readonly AppSettings () As 'System.Collections.Specialized.NameValueCollection' is deprecated: "This method is deprecated, it has been replaced by System.Configuration! System.configuration.configurationmanager.AppSettings
I tried replacing the old method with the new one, but it does not exist.
Strange, since I did a similar thing with a web application, and it existed there.
source share