Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / April 2008

Tip: Looking for answers? Try searching our database.

Install to GAC on Remote Servers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon S. - 29 Aug 2007 05:01 GMT
I have googled this a bunch and it appears that it is not possible to
install to the GAC on a remote machine unless a .msi is created or we use
some 3rd party tool that enables the running of command line apps remotely
(gacutil.exe in this case).

I'm hoping I just missed something, and if not, I'm hoping for some pointers
on accomplishing this.

Using .NET 3.5 beta 2, I'm writing a utility that, amongst other things,
must be capable of installing assemblies to the GAC on both the local
machine and on remote machines visible on the local network. These are all
Windows Server 2003 Web servers in support of ASP.NET Web applications.

We really don't want to separate this GAC installation piece from the
utility (e.g., no .msi or other deployment packaging). Ideally we just plop
the assembly and .snk file into a "launch pad" folder... from which the C#
utility then installs to the multiple other Web servers.

Suggestions?

Thanks in advance!
Marc Gravell - 29 Aug 2007 08:27 GMT
Well, the first thing I would ask is "why GAC?". This is the most
important question...

Other than core framework components and additions (WSE3, WF/WCF/WPF),
you can do most things without using the GAC (just using the default
or custom probing-paths), and hence use "robocopy" depoyment. I find
this works without any difficulty in almost every case; there are some
exceptions (COM facets, serviced components, etc). With this
knowledge, and knowing that I need to be able to deploy easily to a
farm, I tend to design with "robocopy" in mind, hence avoid GAC [for
my own dlls] like the plague.

The second question would be "why deploy the SNK?". This is only
normally needed on a build-server (or developer desktop). Normally the
thumbprint (or hash, or whatever they call it for SNK) suffices.

As for installing into the GAC... at one point, IIRC, msi was the only
supported route, with "gacutil" classed as a development / debugging
tool. I can't be 100% sure, since I (as above) avoid needing to use
it. And don't forget you need to be admin to use it...

Marc
Jon S. - 29 Aug 2007 08:46 GMT
<snip>
RE:
<< Well, the first thing I would ask is "why GAC?". This is the most
important question...>>

While I have been using robocopy for a few years now on this particular
system and have been duplicating the .dlls amongst the Web sites, I want to
some of the assemblies amongst a few web sites on a few Web servers. I have
a utility I have been using to "robocopy-deploy" files to the sites.

I just figured that the GAC is here to help us to share a given assemblies
amongst many applications. In my case they are ASP.NET Web apps... thought I
could simplify things by installing once per server rather than once per Web
site.

Is there some problem with using the GAC? Unless I'm reading you wrong, your
questioning seems to imply that it may be more of a problem than a benefit.
If that is in fact the case, then I'd like to know, as I have not yet
installed anything to the GAC and have just read up on gacutil and how it
needs .snk to do it's job. I was going to roll up my sleeves starting
tomorrow to get my head wrapped around the GAC and make this all happen. But
if you've been there and done that and can tell my why it's not worth it, if
that is in fact the case, I'd appreciate that too.
Marc Gravell - 29 Aug 2007 13:22 GMT
> and how it needs .snk to do it's job.
it needs that the assembly has been strong-named with an SNK (?or
cert?) - however, it doesn't need the actual SNK that was used. The
SNK hash forms part of the full-name of the assembly.

Deploying this may actually present a security risk, in that it would
make it easy for somebody to simulate your dll (including your private
SNK). But generally if somebody can do this they have already
compromised your farm, and you have bigger issues ;-p

> But if you've been there and done that and can tell my why it's not worth it...
In my view, it is just dll-hell all over again; GAC-hell. Disks are
cheap, and having separate copies provides an additional level of
isolation between apps (i.e. you can upgrade each version individually
without having to stress over version-forwarding policies, etc). It
may suit some scenarios (and is a bitter necessity for some that I
already mentioned), but I generally avoid the GAC.

I'd welcome other views from the floor...

Marc
ahmet yerli - 14 Apr 2008 07:42 GMT
You can use
http://www.codeplex.com/remotegacutil

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.