Cannot read app.config, why???
- by user46503
Hello,
I'm trying to get data from app.config and I always get zero. The App.config is here:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="ExplorerContext" connectionString="metadata=res://*/ExplorerData.csdl|res://*/ExplorerData.ssdl|res://*/ExplorerData.msl;provider=System.Data.SqlClient;provider connection string="Data Source=MYT\SQLEXPRESS;Initial Catalog=Explorer;Integrated Security=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
Could someone explain what is wrong, why I cannot get the values,
System.Configuration.ConfigurationManager.AppSettings.Count is always 0
Thanks