Accessing Assemblies not contained in the Web App

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Accessing Assemblies not contained in the Web App

    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 Guest

  2. Similar Questions and Discussions

    1. ViewState of Contained Controls?
      I've built my tab control, and it works great. Except for one problem. Any controls which are contained in any of the tabs lose state. The tab...
    2. Are MS Assemblies in the GAC?
      I want to create strongly signed support assemblies so they can be shared by different ASP.NET web apps. This requires that they be installed into...
    3. Accessing Controls contained in another Control from ASPX Page
      Hi All! Is there any ways to get access to the controls contained in another user controls from an ASP.NET page? For example I have... -...
    4. Self-contained Movie Handle?
      I want to put a movie file into a single self-contained handle that I can store and retrieve and play back. PutMovieIntoHandle wont work because it...
    5. value contained within a variable contained within another variable
      I may be way off track with what I am trying to do, but here is my scenario and I sure appreciate any insights. There is a string stored in...
  3. #2

    Default Re: Accessing Assemblies not contained in the Web App

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

    Here's more info:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconglobalassemblycache.asp[/url]
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxconInstallingToGlobalAssemblyCache.asp[/url]
    [url]http://www.aspzone.com/articles/john/GAC/[/url]

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


    "Mike M" <marsigme@earthlink.net> wrote in message
    news:%23fYbn%23%23TDHA.1724@TK2MSFTNGP10.phx.gbl.. .
    > 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 Guest

  4. #3

    Default Re: Accessing Assemblies not contained in the Web App

    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" <Steve@Orr.net> wrote in message
    news:#XTJMEBUDHA.2512@TK2MSFTNGP10.phx.gbl...
    > 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
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > "Mike M" <marsigme@earthlink.net> wrote in message
    > news:uGIxss$TDHA.2196@TK2MSFTNGP12.phx.gbl...
    > > 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" <Steve@Orr.net> wrote in message
    > > news:ebE5tG$TDHA.2116@TK2MSFTNGP12.phx.gbl...
    > > > It sounds like you should install your shared library to the Global
    > > Assembly
    > > > Cache (GAC)
    > > >
    > > > Here's more info:
    > > >
    > >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm[/url]
    > > l/cpconglobalassemblycache.asp
    > > >
    > >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht[/url]
    > > ml/vxconInstallingToGlobalAssemblyCache.asp
    > > > [url]http://www.aspzone.com/articles/john/GAC/[/url]
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > [url]http://Steve.Orr.net[/url]
    > > >
    > > >
    > > > "Mike M" <marsigme@earthlink.net> wrote in message
    > > > news:%23fYbn%23%23TDHA.1724@TK2MSFTNGP10.phx.gbl.. .
    > > > > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139