Question

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).

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top