To GAC or not?

G

Guest

I am working on a web based app that consists of several web apps, several web services, shared libraries, and custome controls. I need to be able to share the libraries and controls across several web apps. The environment that I am in is a highly controlled one that uses a web farm consisting of many servers that uses replication to replicate from a publishing server to the production servers. The replication server does not replicate the GAC. Also, I don't need to share my assemblies and controls with any of the other 300+ apps on the servers, just my application group. How do I share assemblies and controls across web apps in this case? Am I stuck with using the GAC? Is the GAC the best way to do this? Is there an alternative solution that MS recommends to use rather than the GAC

Thanks.
 
P

Phil Wilson

AFAIK, MS recommends the side-by-side model for the majority of apps. What
exactly are you sharing? If it's just that you have some code libraries that
happen to be used by a bunch of apps, and they can be installed in application
folders, the urge to "share" might really just be a feeling that it's waste of
disk to have all those copies of the same assemblies in lots of places. You want
the equivalent of one copy of mfc42.dll in the system folder instead of multiple
copies of MFC71.dll and msvcr71.dll with each application. What's your
maintenance model? If you get a bug in one of these assemblies, how do you
replace it? Service packs? MSI installs?
--
Phil Wilson [MVP Windows Installer]
----
Jtrigger said:
I am working on a web based app that consists of several web apps, several web
services, shared libraries, and custome controls. I need to be able to share
the libraries and controls across several web apps. The environment that I am
in is a highly controlled one that uses a web farm consisting of many servers
that uses replication to replicate from a publishing server to the production
servers. The replication server does not replicate the GAC. Also, I don't need
to share my assemblies and controls with any of the other 300+ apps on the
servers, just my application group. How do I share assemblies and controls
across web apps in this case? Am I stuck with using the GAC? Is the GAC the
best way to do this? Is there an alternative solution that MS recommends to use
rather than the GAC?
 
J

JTrigger

Like i said in my original post, I not only need to share some code
libraries, but I also need to share some user defined and server controls
across web apps. So far I have found that you either need to cut and paste
code into each app, or load them into the GAC. Neither works for me. I
don't want the nightmare of maintaining the same code in many places, and
the environment I am in restricts me from using GAC.

The question about if I use service packs or MSI installs was also already
answered in my original post, maybe not. My apps go on a shared web farm
with more than 300+ other apps. We must post to the publishing server using
Frontpage extensions, YUCK!!! From there it gets replicated out the the
rest of the servers in the farm.

So, I guess the root question is how do I share the custom controls and
libraries with all my web apps without having to maintain the code in more
than one place, and without using the GAC? Also, how do I use versioning on
them without the GAC?

Phil Wilson said:
AFAIK, MS recommends the side-by-side model for the majority of apps. What
exactly are you sharing? If it's just that you have some code libraries that
happen to be used by a bunch of apps, and they can be installed in application
folders, the urge to "share" might really just be a feeling that it's waste of
disk to have all those copies of the same assemblies in lots of places. You want
the equivalent of one copy of mfc42.dll in the system folder instead of multiple
copies of MFC71.dll and msvcr71.dll with each application. What's your
maintenance model? If you get a bug in one of these assemblies, how do you
replace it? Service packs? MSI installs?
--
Phil Wilson [MVP Windows Installer]
----
Jtrigger said:
I am working on a web based app that consists of several web apps,
several web
services, shared libraries, and custome controls. I need to be able to share
the libraries and controls across several web apps. The environment that I am
in is a highly controlled one that uses a web farm consisting of many servers
that uses replication to replicate from a publishing server to the production
servers. The replication server does not replicate the GAC. Also, I don't need
to share my assemblies and controls with any of the other 300+ apps on the
servers, just my application group. How do I share assemblies and controls
across web apps in this case? Am I stuck with using the GAC? Is the GAC the
best way to do this? Is there an alternative solution that MS recommends to use
rather than the GAC?
 
P

Paul Clement

¤ Like i said in my original post, I not only need to share some code
¤ libraries, but I also need to share some user defined and server controls
¤ across web apps. So far I have found that you either need to cut and paste
¤ code into each app, or load them into the GAC. Neither works for me. I
¤ don't want the nightmare of maintaining the same code in many places, and
¤ the environment I am in restricts me from using GAC.
¤
¤ The question about if I use service packs or MSI installs was also already
¤ answered in my original post, maybe not. My apps go on a shared web farm
¤ with more than 300+ other apps. We must post to the publishing server using
¤ Frontpage extensions, YUCK!!! From there it gets replicated out the the
¤ rest of the servers in the farm.
¤
¤ So, I guess the root question is how do I share the custom controls and
¤ libraries with all my web apps without having to maintain the code in more
¤ than one place, and without using the GAC? Also, how do I use versioning on
¤ them without the GAC?

As Phil mentioned, you can share an assembly amongst applications, without use of the GAC, if you
are using Windows XP (which supports the side-by-side feature).

Installation of Win32 Assemblies
http://msdn.microsoft.com/library/d...es_for_side_by_side_sharing_on_windows_xp.asp


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
J

JTrigger

Does no one fully read posts before responding?

I will explain once again. I CANNOT USE WINDOWS INSTALLER/MSI PACKAGES!!!
I am forced to use FrontPage extensions to push the web apps up to the
publishing server that then replicates out to the production farm. In other
words, I must be able to do an XCopy rollout.

Sharing assemblies is all fine and dandy, but no one has answered my
question about sharing user defined controls, or server controls. Is it
possible to easily share these controls across applications without using
the GAC or maintaining the code in more than 1 place?


 
P

Paul Clement

¤ Does no one fully read posts before responding?
¤
¤ I will explain once again. I CANNOT USE WINDOWS INSTALLER/MSI PACKAGES!!!
¤ I am forced to use FrontPage extensions to push the web apps up to the
¤ publishing server that then replicates out to the production farm. In other
¤ words, I must be able to do an XCopy rollout.
¤
¤ Sharing assemblies is all fine and dandy, but no one has answered my
¤ question about sharing user defined controls, or server controls. Is it
¤ possible to easily share these controls across applications without using
¤ the GAC or maintaining the code in more than 1 place?
¤

There have been two responses that document what is necessary to share these components. I have no
idea which OS you are using because you haven't indicated which version.

But here is your answer. If the only deployment mechanism you can use is FrontPage Server
Extensions, and you need to share these components instead of deploying copies for each application,
then you should register your assemblies with the GAC.

The only other *possible* alternatives I cannot recommend. But if you want to investigate:

How the Runtime Locates Assemblies
http://msdn.microsoft.com/library/d...ide/html/cpconhowruntimelocatesassemblies.asp


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top