Reputation: 963
I have a solution with three projects:
The WA’s web.config
and the DML's app.config
each have a connection string section specifying a connection string for the database.
I've noticed that the DML connection string doesn't really matter. So is it safe to completely remove this section from the app.config
file?
Also, why is this string unused? Finally, I'm guessing when the application is run, the connection to the database is established using the connection string in the web.config
file and the database definition is managed by the DML/DAL?
Is this because the other projects aren’t really being run per se, just the methods and properties are being referenced? Thanks
Upvotes: 1
Views: 73
Reputation: 432
Yes, you can remove connection string from DML's app.config. It is unused because you are starting the web application and only it's config does matter at runtime.
Upvotes: 1
Reputation: 13458
Everything needs to go into your app.config / web.config. The config files on the library project only help you to keep track of things that need to go into your app.config
Upvotes: 0