Link to home
Start Free TrialLog in
Avatar of Tom McDonald
Tom McDonaldFlag for United States of America

asked on

access is denied to windows assembly

I am trying to register a dll by dragging it into the c:\windows\assembly folder (win 7).  When I do so I get a 'access is denied: [filename]' error.  I am an administrator on the box and and I running file explorer as an admin so permissions shouldn't be an issue.
ASKER CERTIFIED SOLUTION
Avatar of Tom McDonald
Tom McDonald
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Amandeep Singh Bhullar
Why you are copying the DLL in system folder.
Copy it in the Bin Folder of your application.

You can also add this using "Add Reference" Option
You need to copy the DLL in the windows folder, then change the access rights for special folder of windows

Check the link
http://www.addictivetips.com/windows-tips/windows-7-access-denied-permission-ownership/

Hope this will help you :-)
Avatar of Tom McDonald

ASKER

When I right click the c:\windows\assembly folder I don't see a 'security' tab so I can't change permissions.  I'm an admin, but still no tab
Thanks, but please see the link you sent, it says "Under Windows 7 this no longer works, I always get "Access is denied"

I'm running Win 7 so I'll need a different fix.
Is this a new assembly or you are updating a currently added assembly.
If you are updating the current assembly, then you need to check, whether it is loaded in assembly or not

you can also try the below command
icacls c:\windows\assembly /grant my_windows_user_name:F /T /C
This works in Vista, you can check it in windows
This is a new assembly.  I tried the command line but no luck.  Here is the error message:

Access is denied.
Successfully processed 0 files; Failed processing 3739 files
have you executed command from command prompt in Adminitrator mode
i.ee\.: command prompt as "Run as Administrator"
I ran as admin and that changed things. The message is now:

Successfully processed 3482 files; Failed processing 257 files

So now it appears I have processed files in the assembly cache (GAC), but that isn't what I want to do.  What I want to do is to add a new file to the GAC.  Is there a way I can do that?