Showing posts with label GAC. Show all posts
Showing posts with label GAC. Show all posts

"Access is denied" - dll deployed to GAC



I faced an issue when I tried to add my dll file to Windows GAC.

Inspite of having signed DLL file, I received "Access is denied" error message.

To come out of the issue, I found one of the easy way:

Go to Start > Control Panel > Administrtor Tools > Services > Indexing Service
Stop the service.

Thats it, now I was able to deploy the DLL in GAC.

Deploying Assembly in GAC vs BIN


There are many differences between these two methods...

Read it here

Excerpts:

  • If you are frequently updating the Assembly,
    then you always better to deploy it in BIN.  Since, Assembly will be
    reloaded automatically just after the updating.    But when you update
    the Assembly in GAC, you have to restart the IIS (IISRESET) to grab the
    new version. The reason is GAC keeps the assembly in Cache.

  • When you deploy your Assembly on GAC then you can access
    the Assembly from any SharePoint web application. But when you deploy
    Assembly in web application’s BIN folder, then it can only access from
    the given web application. Anyway, if you have all-purpose web part,
    you better to deploy it in GAC and avoid the multiple Assembly
    deployments in BIN. 

  • If you have multiple versions of same Assembly, then you
    have to deploy it in GAC. Coz, GAC manages the multiple version of
    given Assembly, but BIN doesn’t.

Click here to read full article