locked
How get Connection string from app.config? RRS feed

  • Question

  • How can I get connection string from app.config ?

    I have multi tier pjoject (web layer, bussniss layer and data access layer)

    In web layer there web.config.
    In data access layer there app.config (this file contain connection string).

    How can I get connection string from data access layer app.config?

    My code is:
    constr= ConfigurationManager.ConnectionStrings["consre"].ConnectionString;
    but this line go to web.confing

    Tuesday, April 28, 2009 2:30 PM

Answers