problem in reading of connection string inside app.config by application
-
i found my problem my problem is the application is not read the connection string in app.config so when i start with debugging, it is all write but when start without debugging the exception is thrown another thing when i clear the comming from machine.config as the following code <configuration> <clear/> <connectionStrings> <add name="ConnectionString" connectionString="Data Source=.;Initial Catalog='Computer Sales System';Integrated Security=True"/> </connectionStrings> </configuration> the exception is thrown in both sides so i understand that the connection string in app.config is not read by application so i want to know why???????? and what is the solution for this problem thanks
-
i found my problem my problem is the application is not read the connection string in app.config so when i start with debugging, it is all write but when start without debugging the exception is thrown another thing when i clear the comming from machine.config as the following code <configuration> <clear/> <connectionStrings> <add name="ConnectionString" connectionString="Data Source=.;Initial Catalog='Computer Sales System';Integrated Security=True"/> </connectionStrings> </configuration> the exception is thrown in both sides so i understand that the connection string in app.config is not read by application so i want to know why???????? and what is the solution for this problem thanks
Don't use app.config -- write your own configuration file.
-
i found my problem my problem is the application is not read the connection string in app.config so when i start with debugging, it is all write but when start without debugging the exception is thrown another thing when i clear the comming from machine.config as the following code <configuration> <clear/> <connectionStrings> <add name="ConnectionString" connectionString="Data Source=.;Initial Catalog='Computer Sales System';Integrated Security=True"/> </connectionStrings> </configuration> the exception is thrown in both sides so i understand that the connection string in app.config is not read by application so i want to know why???????? and what is the solution for this problem thanks