Enterprise library connection when dll app created.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Metehanma@hotmail.com

    Enterprise library connection when dll app created.

    I am creating Library (dll) with visual studio. Not windows, console,
    or aspnet application, just a library(dll). Later i will use this dll
    with my application.
    When windows app or aspnet app, Use app.config or web.config to put
    connection config files.
    When i do dll app where would i put my configuration of connectons..?

    i hope i clear.

  • =?Utf-8?B?TWlzYmFoIEFyZWZpbg==?=

    #2
    RE: Enterprise library connection when dll app created.

    dll's are loaded into the application domain of the referencing application
    i.e. either a windows app or a web app and hence make use of the applications
    config file. The library's config file must be merged by hand into the app's
    config file for the dll to read connectionstrin g etc from this config file.
    However there are ways / hacks into making a dll use its own config file
    instead of the application config file. This involes dynamically creating an
    application domain and specifying the dll.config file for this AppDomain. The
    problem with this approach however is that to access any type in the library
    from the current domain you'll have to use .NET remoting to get across the
    AppDomain boundary.

    Besides it is less of an effort than requiring the users of the library to
    write special code to load the library into another app domain, create types
    in the other app domain and then use .NET remoting to access those objects.




    --
    Misbah Arefin




    "Metehanma@hotm ail.com" wrote:
    I am creating Library (dll) with visual studio. Not windows, console,
    or aspnet application, just a library(dll). Later i will use this dll
    with my application.
    When windows app or aspnet app, Use app.config or web.config to put
    connection config files.
    When i do dll app where would i put my configuration of connectons..?
    >
    i hope i clear.
    >
    >

    Comment

    Working...