Saturday, March 31, 2012

Sharing DLLs among multiple ASP.NET Apps

Hi,
I'm fairly new to using ASP.NET, so please bare with me. I'm writing
some classes that provide a business layer functions. But these
functions need to be accessed from a series of websites hosted on IIS.
I know normally you would put the DLL inside the web app's /bin
directory. But that seems rather wasteful to copy the same DLLs over
and over again into 12 bin directories for the 12 sites that will be
hosted. Is there a better way to make the DLLs globally available?
Thanks.
Xin LiThe Global Assembly Cache is your friend (assuming your DLLs are .NET
assemblies - or can be wrapped inside of .NET Assemblies). Here's more:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconglobalassemblycache.asp
"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.com...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li
I agree with Jeremy.
Here's more links on the GAC for you:
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, MVP
http://Steve.Orr.net
"Xin Li" <xinli11@.gmail.com> wrote in message
news:c007feeb.0406261456.3f6dee28@.posting.google.com...
> Hi,
> I'm fairly new to using ASP.NET, so please bare with me. I'm writing
> some classes that provide a business layer functions. But these
> functions need to be accessed from a series of websites hosted on IIS.
> I know normally you would put the DLL inside the web app's /bin
> directory. But that seems rather wasteful to copy the same DLLs over
> and over again into 12 bin directories for the 12 sites that will be
> hosted. Is there a better way to make the DLLs globally available?
> Thanks.
> Xin Li

0 comments:

Post a Comment