Configuration Manager Question.........Anyone......Help??
-
In ASP.NET 1.1, from by BusinessLayer(a class library project), I used to get Connection string as : string dsn =ConfigurationSettings.AppSettings["connection"]; and pass to DataAccessLayer(DAL). It worked. On 2.0, if I used the previous one, it warns saying it is obsolete. If I put connection string in , they have new settings..... like this: string dsn = ConfigurationManager.ConnectionString["connection"]; It gives me error. Moreover, I cannot get ConfigurationManager class from my Business Layer. How should I pass connection string from BusinessLayer to DAL using ConfigurationManager. Please reply.... Thanks. Sanjeev
-
In ASP.NET 1.1, from by BusinessLayer(a class library project), I used to get Connection string as : string dsn =ConfigurationSettings.AppSettings["connection"]; and pass to DataAccessLayer(DAL). It worked. On 2.0, if I used the previous one, it warns saying it is obsolete. If I put connection string in , they have new settings..... like this: string dsn = ConfigurationManager.ConnectionString["connection"]; It gives me error. Moreover, I cannot get ConfigurationManager class from my Business Layer. How should I pass connection string from BusinessLayer to DAL using ConfigurationManager. Please reply.... Thanks. Sanjeev