DLL, GAC, and Multiple Web Sites

Discussion in 'ASP .Net' started by Smithers, Aug 14, 2007.

  1. Smithers

    Smithers Guest

    Just wondering if it is perfectly straight-forward and safe to have a .dll
    installed in the GAC on a Web server - and have multiple Web sites make use
    of the .dll.

    Until now I've been XCopying all files for each Web site - including
    duplicating .dlls amongst the sites. I was wondering if I would benefit from
    moving the common assemblies to the GAC or continue duplicating them amongst
    Web sites.

    Would a dll installed in the GAC load into each Web site's AppDomain just as
    if it were installed in the site's bin directory?

    Thanks.
    Smithers, Aug 14, 2007
    #1
    1. Advertising

  2. Hi,
    as you have mentioned this more about securing your application and web
    server than about anything else. Assembly in GAC runs always in FullTrust
    mode and by default can be called only by fully trusted callers - you can
    change this behavior by applying assembly:AllowPartialyTrustedCallers so
    partialy trusted web application can also use this assembly. The question is
    if this is really way which you want to go because any assembly running on
    your machine can then use that assembly installed in GAC.

    Installing assembly to GAC can generaly reduce deployment tasks and allow
    you to control versioning in much easier way. But from the security view it
    should not be the best way to go.

    Regards,
    Ladislav


    "Smithers" wrote:

    > Just wondering if it is perfectly straight-forward and safe to have a .dll
    > installed in the GAC on a Web server - and have multiple Web sites make use
    > of the .dll.
    >
    > Until now I've been XCopying all files for each Web site - including
    > duplicating .dlls amongst the sites. I was wondering if I would benefit from
    > moving the common assemblies to the GAC or continue duplicating them amongst
    > Web sites.
    >
    > Would a dll installed in the GAC load into each Web site's AppDomain just as
    > if it were installed in the site's bin directory?
    >
    > Thanks.
    >
    >
    >
    =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?=, Aug 14, 2007
    #2
    1. Advertising

  3. If it works, sounds fine to me. Just remember that when you've got a GAC'ed
    assembly and you need to change things, you'll now have additional deployment
    / maintenance issues to deal with.
    -- Peter
    Recursion: see Recursion
    site: http://www.eggheadcafe.com
    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "Smithers" wrote:

    > Just wondering if it is perfectly straight-forward and safe to have a .dll
    > installed in the GAC on a Web server - and have multiple Web sites make use
    > of the .dll.
    >
    > Until now I've been XCopying all files for each Web site - including
    > duplicating .dlls amongst the sites. I was wondering if I would benefit from
    > moving the common assemblies to the GAC or continue duplicating them amongst
    > Web sites.
    >
    > Would a dll installed in the GAC load into each Web site's AppDomain just as
    > if it were installed in the site's bin directory?
    >
    > Thanks.
    >
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Aug 14, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nayt Grochowski
    Replies:
    2
    Views:
    564
    Nayt Grochowski
    Dec 3, 2003
  2. Kevin Buchan
    Replies:
    1
    Views:
    455
    Eric Lawrence [MSFT]
    Feb 20, 2004
  3. Jasbird

    Sites about web-sites ?

    Jasbird, Sep 12, 2006, in forum: HTML
    Replies:
    1
    Views:
    381
  4. imx
    Replies:
    10
    Views:
    778
  5. =?Utf-8?B?Wm9ycGllZG9tYW4=?=

    How do you reference a dll that is not in the GAC on a .net Web Si

    =?Utf-8?B?Wm9ycGllZG9tYW4=?=, Jul 19, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    397
    bruce barker
    Jul 19, 2007
Loading...

Share This Page