web.config overrides app.config...why?

Posted by vikp on Stack Overflow See other posts from Stack Overflow or by vikp
Published on 2010-06-03T09:50:39Z Indexed on 2010/06/03 9:54 UTC
Read the original article Hit count: 538

Hi,

I have to DLLs: one with a web.config, another one with app.config

I moved the connection strings from web.config to app.config so that it can be used by other DLLs.

Now, when I call ConfigurationManager.GetSection("SomeSection") , the application looks for a web.config, when it should be looking for the app.config. It doesn't make sense why it does it because web.config is in a separate DLL.

Can anybody explain this please?

© Stack Overflow or respective owner

Related posts about configuration

Related posts about web-config