Why wont my web application read my DataAccessLayer.dll.config file? RRS feed

  • Pregunta

  • I'm trying to use application settings with a C#.NET project I am working on. But I can't seem to get it to return anything other then the default values. Through the project properties I've added a single setting, DBConnectionString, and set its value to a connection string I want to use. Its scope is set to "application".

    Doing this created a number of files including Settings.settings, Settings.Designer.CS, and app.config. The Settings class then has custom, type safe, properties that can be used to set and retrieve each setting. The app.config file is a XML file that stores the actual settings values.

    When I build my project it looks like the app.config file is copied to the target directory as DataAccessLayer.dll.config. My web application runs fine and is able to use the default connection string.

    Next I tried to edit the DataAccessLayer.dll.config file to change the connection string. I ran my web application again, but it continued to use the default value. (Files in \bin deploy folder).

    This project is a class library that use to a Web project and sometimes the connection string can changes.

    lunes, 8 de junio de 2015 23:05

Todas las respuestas