Reputation: 3265
I have two projects, an asp.net MVC project called Home and a c# class library project called Home.Dao.
When publishing the Home project in IIS server, I can only find these files (web.config, Hom.Dao.dll, ... etc ) there is no app.config published. My problem is I cannot set the connectionstring after publishing. So I have two questions in mind :
Upvotes: 0
Views: 965
Reputation: 14017
To answer your questions:
To explain why:
Configuration files are only created for the top-level application. For web applications this is the web.config file which is copied to the output directory. For executables the app.config is renamed to -executable name-.exe.config. Configurations are only read from the top-level application config. All settings you need have to be there. So if you transfer your connection string to your web.config, you're good.
Upvotes: 2