1

I just installed two libraries on GAC and I'm trying to use them in a simple application where I only call the constructor of my method:

  MyMethod m = new MyMethod();

When I try to run the .exe of my app, I can see it in the task manager processes, but it doesn't load.

If I elevate permissions of the executable, then the simple app appears on task manager, and also loads. But, why is it that I need to give administrator permissions to an application that consumes GAC assemblies? It's the first time it happens to me.

How can I consume a GAC assembly without asking for administrator permissions?

I think I have GAC permissions to read, as I can read the older version, but not the newer one...

EDIT: *I realized that, if I stay for some minutes, the .dll is consumed and the application runs. But everytime I need an assembly that I installed on GAC, has a really big delay.* Any idea on why?

EDIT: Sorry, I didn't say which library is it because it is called UserControlLibrary.dll, I developed it. And there are older versions of my library that are used on some of my older projects.

To use the new one, I published a policy that redirects from the old version of the assembly to the new one.

NOTE: Usage of the older version works fine. Usage of the new one, doesn't work (after redirection).

Sonhja
  • 8,230
  • 20
  • 73
  • 131
  • Why negative votes and not explaining why? I have a really important problem, and I will thank a lot at least that people explain that negatives votes, so I can improve my question an, fortunately, somebody can help me... – Sonhja Jun 07 '13 at 11:17

1 Answers1

0

Can you be more specific about which assemblies and what your code is trying to do?...

Giving admin privelidges is kind of a catchall... there's more likely a certain permission required that you have not provided...

e.g. here's a little ditty about the same issue for SharePoint where the SSRSSvcAccount account did not have read permission for the GAC, which was solved using

cacls.exe %windir%/assembly /e /t /p DOMAIN\SSRSSvcAccount:R
Paul Zahra
  • 9,522
  • 8
  • 54
  • 76
  • That's not the problem. I can read from GAC, but my app remains at background on TaskManager if not run as administrator, but not loading. – Sonhja Jun 07 '13 at 10:14
  • How did you install it into the GAC? Have you looked at the ACL; the systemroot directory is often protected using an access control list (ACL) to control write and execute access. Because the global assembly cache is installed in a subdirectory of the systemroot directory, it inherits that directory's ACL. – Paul Zahra Jun 07 '13 at 10:46
  • I install it using WiX, publishing it as an Assembly=".net" – Sonhja Jun 07 '13 at 10:52
  • hmmm... where does the dll reside? is it in a trusted zone? – Paul Zahra Jun 07 '13 at 13:10