473,513 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.
Nov 17 '05 #1
2 2105
It sounds like you should install your shared library to the Global Assembly
Cache (GAC)

Here's more info:
http://msdn.microsoft.com/library/de...emblycache.asp
http://msdn.microsoft.com/library/de...emblyCache.asp
http://www.aspzone.com/articles/john/GAC/

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Mike M" <ma******@earthlink.net> wrote in message
news:%2********************@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.

Nov 17 '05 #2
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" <St***@Orr.net> wrote in message
news:#X**************@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
http://Steve.Orr.net
"Mike M" <ma******@earthlink.net> wrote in message
news:uG**************@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" <St***@Orr.net> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
It sounds like you should install your shared library to the Global Assembly
Cache (GAC)

Here's more info:

http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconglobalassemblycache.asp

http://msdn.microsoft.com/library/de...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" <ma******@earthlink.net> wrote in message
news:%2********************@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.
>
>



Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1397
by: S Arnold | last post by:
Magic Software invites you to join us this coming Tuesday (February 24th, 2004) at 12:00 EDT / 17:00 GMT for a FREE live Webinar: Accessing .NET assemblies via eDeveloper Title: Accessing .NET...
2
6970
by: msnews.microsoft.com | last post by:
How can we access an internal class in a referenced file in a multi-file assembly. All documentation states the obvious purpose of the internal keyword on a class, but when referencing an...
2
1680
by: Abdessamad Belangour | last post by:
Hi all, and thanks for previous answers (especially Nicholas Paldino) An assembly is composed of a set of modules. The module class has a method for reading global methods GetMethods(). My...
4
14465
by: Jimi | last post by:
Given a C# project file path, can I use reflection to get all the assemblies referenced by the project? e.g., I know the path of a C# project, say, "c:\SomeProject.csproj", and I want to load...
2
7254
by: franzhe | last post by:
Hi all, in a simple ASP.Net application with resources in satellite assemblies I have the following problem: If I set <identity impersonate="true"/>, accessing a culture specific resource...
2
1384
by: Willy | last post by:
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... - User Control A |_ User Control B (which uses User...
2
1345
by: John | last post by:
Hi What are assemblies and what purpose do they serve? Thanks Regards
1
1347
by: Craig | last post by:
My team is building an application in VS.NET 2005. To avoid a monolithic app and spread the development workload, we have a relatively small framework application that instantiates module...
2
5089
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.