Microsoft.BizTalk.Gac.Fusion, Access denied Exception and GAC is empty

Posted at: 1/8/2007 at 7:56 PM by saravana

 

Once in a while you get the following error while trying to compile/build the BizTalk project (With few more Access denied errors and some HRESULT values).

Error 2 at Microsoft.BizTalk.Gac.Fusion.IAssemblyCache.InstallAssembly(AssemblyCacheInstallFlag flags, String manifestFilePath, FusionInstallReference referenceData)
at Microsoft.BizTalk.Gac.Gac.InstallAssembly(String assemblyPathname, Boolean force)
at Microsoft.BizTalk.Deployment.BizTalkAssembly.GacInstall(String assemblyLocation)
at Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String server, String database, String assemblyPathname, String applicationName)
at Microsoft.BizTalk.Deployment.BizTalkAssembly.Deploy(Boolean redeploy, String server, String database, String assemblyPathname, String group, String applicationName, ApplicationLog log)

The error messages were very generic and its hard to diagnose anything with those messages. As a developer you tend to try few things like 1. Shutting down Visual Studio, 2. Restarting Biztalk, 3. Restarting IIS, 4. Stopping Virus scanners, etc etc and at one stage even restarting Windows. After doing one, two or all of the above steps, you'll be ok at some point (but you never know the root cause). The project will recompile without any issues this time.  Whenever you are experiencing this issue if you look at the GAC, the GAC will be empty (Yes! believe me, scary stuff, but that's true. I put two pictures below to show that).

You'll experience similar errors once in a while, when you have some Visual Studio "Built Events" scripts that deploy assemblies into GAC. One day I decided to spend some time and find out the root cause for the problem. SysInternals (Oops! now Microsoft's) FileMon came to rescue, I put the filter on FileMon to watch for the GAC folder and started to rebuild the assemblies, all of a sudden I started to see the process cisvc.exe popping up the screen, a bit of search revealed it the "Indexing Service" that blocks the GAC folder temporarily. I don't know whether "Indexing Service" is part of Windows XP or it got installed as part of some other updates. If in case you have it installed on your PC, that's the services you need to start and stop if you are experiencing the problem outlined in this article.

Nandri!

Saravana

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: | |  Categories: .NET | BizTalk General
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(8) | Comments RSS

Comments

Tuesday, May 22, 2007 5:32 PM
Chris Lively
This can also occur if you are running Vista.

The only workaround is to run VS2005 as an administrator, then deploying will function.

I have tested the solution with vs2005 sp1 + the vista update to sp1
Thursday, July 19, 2007 4:39 PM
Anonymous
Anonymous
Thank you so much for saving so much time. I kept running into that problem many times a day...
Saturday, February 09, 2008 1:17 AM
Anonymous
Anonymous
I am also getting the same error and I do not have cisvc.exe installed and I am running VS 2005 as an adminstrator. I still get the same error, I am running Vista Ultimate. Any help would be appreciated.

Thx
Yaz
Wednesday, March 05, 2008 11:55 AM
Anonymous
Anonymous
Thnx a lot - it solved my problem on 2003 server box.
Monday, May 12, 2008 2:34 PM
Anonymous
Anonymous
Thanks a lot for the post. This information helped me.
Tuesday, May 20, 2008 3:04 AM
avinash
I was facing the same issue. I was running it on Vista Basic env. I ran VS as Admin (right click on VS , open Advance then select run as admin) and problem got solved
Monday, August 18, 2008 5:06 PM
gautam in
gautam
thnx a lot.....
it worked on vista sp1
Wednesday, November 12, 2008 12:11 PM
Saman au
Saman
Yes its working when i run VS 2005 as administrator mode in vistar

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading