Settings in referenced dll

Hi,
I have created a dll (Data.dll) wich encapsulate data acces. This contain same Tableadapters wich ConnectionString is saved to application configuration file.

I have created another project (menu.exe) with a reference to the data.dll.

When I deploy menu.exe application, How I can modify the values for connectionString used by the Data.dll settings

Thanks


Answer this question

Settings in referenced dll

  • Saurabh Chechi - MSFT

    How i can do if the dll contains references to web services...

    and then in mi web project that make reference to that dll, needs to change the dll setting of the web service



  • tryanothername

    Hi,

    Yes, you are right, for web applications and web services the configuration settings need to stored in the web.config file.

    Regards,
    Vikram

  • Khalilme

    Thanks for the reply.
    Another question: if the hosting application is a web service, I muts add the settings in web.config file

    Regards
    JMBC

  • l4ci

    Hi JMBC,

    The application configuration file is associated with an application and not a DLL. The DLL takes the Configuration Settings from the config file of the hosting application such as console app/windows app or web app.

    So you need to add the connectionstring setting in the App.config file of menu.exe. Then when you access it from Data.dll which has been added as a reference to menu.exe, the DLL automatically picks up the data from the menu.exe.config file.

    Regards,
    Vikram

  • Settings in referenced dll