Accessing Assemblies not contained in the Web App

Discussion in 'ASP .Net' started by Mike M, Jul 22, 2003.

  1. Mike M

    Mike M Guest

    Hello,

    I created a simple C# library assembly that exposes general facilities I
    would like to use in my ASP.NET web applications. If I added the assembly
    into the bin directory of my asp.net app, the runtime finds the assembly
    without a problem and resolves any references to the classes exposed by the
    assembly. However, I do not wish to deploy the assembly into each bin
    directory for each web application. I would like to specify the library
    assembly in a "global" directory on my web server. (By global I'm referring
    to a directory that is not part of any web application.) Then each web
    application that references my custom assembly will reference the only copy
    of the assembly found in a global directory. The problem I'm having is that
    my ASPX module does not like assembly directives that point to assemblies
    outside the web application. I tried modify the application web.config file
    to include a <codebase> and <probing> element in the configuration's runtime
    element but without success. So, is it possible to reference "global"
    assemblies? If so, how should the web.config file be setup?

    Thanks for you time,
    Mike M.
    Mike M, Jul 22, 2003
    #1
    1. Advertising

  2. It sounds like you should install your shared library to the Global Assembly
    Cache (GAC)

    Here's more info:
    http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconglobalassemblycache.asp
    http://msdn.microsoft.com/library/d...html/vxconInstallingToGlobalAssemblyCache.asp
    http://www.aspzone.com/articles/john/GAC/

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "Mike M" <> wrote in message
    news:%23fYbn%23%...
    > Hello,
    >
    > I created a simple C# library assembly that exposes general facilities I
    > would like to use in my ASP.NET web applications. If I added the assembly
    > into the bin directory of my asp.net app, the runtime finds the assembly
    > without a problem and resolves any references to the classes exposed by

    the
    > assembly. However, I do not wish to deploy the assembly into each bin
    > directory for each web application. I would like to specify the library
    > assembly in a "global" directory on my web server. (By global I'm

    referring
    > to a directory that is not part of any web application.) Then each web
    > application that references my custom assembly will reference the only

    copy
    > of the assembly found in a global directory. The problem I'm having is

    that
    > my ASPX module does not like assembly directives that point to assemblies
    > outside the web application. I tried modify the application web.config

    file
    > to include a <codebase> and <probing> element in the configuration's

    runtime
    > element but without success. So, is it possible to reference "global"
    > assemblies? If so, how should the web.config file be setup?
    >
    > Thanks for you time,
    > Mike M.
    >
    >
    Steve C. Orr, MCSD, Jul 22, 2003
    #2
    1. Advertising

  3. Mike M

    Mike M Guest

    I'll have to see if my web hosting service provider is willing to add
    assemblies to the GAC. Unfortunately, I'm kinda at the mercy of an
    out-sourced production environment. That's why I'm looking for a self
    contained method for accessing assemblies.

    Thanks for the help.


    "Steve C. Orr, MCSD" <> wrote in message
    news:#...
    > I can't say for sure if it's the only way, I can only say that it is the
    > right way.
    > This is exactly what the GAC was designed for. I suggest you use it

    unless
    > it has some specific shortcoming that does not meet your requirements.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    >
    >
    > "Mike M" <> wrote in message
    > news:uGIxss$...
    > > Hi Steve,
    > >
    > > Yes, that would probably solve the problem but is that the only solution
    > > available? Is there no way to structure
    > > the web.config file to search outside the current web application?
    > >
    > > Thanks,
    > > Mike
    > >
    > >
    > > "Steve C. Orr, MCSD" <> wrote in message
    > > news:ebE5tG$...
    > > > It sounds like you should install your shared library to the Global

    > > Assembly
    > > > Cache (GAC)
    > > >
    > > > Here's more info:
    > > >

    > >

    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
    > > l/cpconglobalassemblycache.asp
    > > >

    > >

    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
    > > ml/vxconInstallingToGlobalAssemblyCache.asp
    > > > http://www.aspzone.com/articles/john/GAC/
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > http://Steve.Orr.net
    > > >
    > > >
    > > > "Mike M" <> wrote in message
    > > > news:%23fYbn%23%...
    > > > > Hello,
    > > > >
    > > > > I created a simple C# library assembly that exposes general

    facilities
    > I
    > > > > would like to use in my ASP.NET web applications. If I added the

    > > assembly
    > > > > into the bin directory of my asp.net app, the runtime finds the

    > assembly
    > > > > without a problem and resolves any references to the classes exposed

    > by
    > > > the
    > > > > assembly. However, I do not wish to deploy the assembly into each

    bin
    > > > > directory for each web application. I would like to specify the

    > library
    > > > > assembly in a "global" directory on my web server. (By global I'm
    > > > referring
    > > > > to a directory that is not part of any web application.) Then each

    > web
    > > > > application that references my custom assembly will reference the

    only
    > > > copy
    > > > > of the assembly found in a global directory. The problem I'm having

    > is
    > > > that
    > > > > my ASPX module does not like assembly directives that point to

    > > assemblies
    > > > > outside the web application. I tried modify the application

    > web.config
    > > > file
    > > > > to include a <codebase> and <probing> element in the configuration's
    > > > runtime
    > > > > element but without success. So, is it possible to reference

    "global"
    > > > > assemblies? If so, how should the web.config file be setup?
    > > > >
    > > > > Thanks for you time,
    > > > > Mike M.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Mike M, Jul 22, 2003
    #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. Patrice Vogel
    Replies:
    0
    Views:
    501
    Patrice Vogel
    Mar 7, 2005
  2. Willy
    Replies:
    2
    Views:
    536
    Karl Seguin
    Dec 21, 2004
  3. sunfire
    Replies:
    0
    Views:
    321
    sunfire
    Jun 14, 2007
  4. Willy
    Replies:
    2
    Views:
    138
    Karl Seguin
    Dec 21, 2004
  5. Willy
    Replies:
    2
    Views:
    212
    Karl Seguin
    Dec 21, 2004
Loading...

Share This Page