SharePoint Experts, Information Architects, Expert Witness

We provide consulting in a broad array of business and technology from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. Specialists in Microsoft, we are a premier provider of SharePoint Expertise (including 2016 and Office 365). We also provide Expert Witness/Legal Expert in eDiscovery, source discovery, patent infringement, piracy and more! We also have established SICG DLDS s.a. - our counterpart in Costa Rica that specializes in water systems (http://www.crwatersolutions.com) - Contact me direct: david_sterling@sterling-consulting.com or call 704-873-8846 x704.

Search This Blog

Wednesday, February 23, 2011

Unable to add DLL to the GAC (windows/assembly) - GAC Access Denied

Had an issue with a client on not being able to add a DLL to the GAC on a production machine though an Administrator and Domain Admin...Found a great post on this here: http://www.supremelink.se/post/GAC-and-Access-Denied.aspx - to wit:

Have you ever got that annoying "Access Denied" when using Gacutils  to ad an dll to GAC? Well....I have. The reason to my problem was that (as the error says) I had no access to add dll:s into it. I am administrator on my machine, so I think it´s a little bit confusing.

This command did it for me:
CACLS c:\WINDOWS\assembly /e /t /p [DOMAIN|MACHINENAME]\useraccount:F

CACLS is an application that can display or modify the Access Control List (ACLs) of files.

So, what I´m telling my OS (Windows XP) is that my user (machinename\useraccount) should have full rights (the :F after my user) to the WINDOWS\assembly (GAC) folder. /e tells CACLS that I want to edit ACL instead of replacing it. /t tells it that those changes should be applied to this folder and it´s subfolders. /p tells the application that my users access rights should be replaced.

For more info, type CACLS /? in CMD.

FYI: In Vista CACLS is deprecated. Use Icacls instead.

Thanks to Martin Andersson for the Post...

No comments: