Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

by eliasen 15. oktober 2009 20:41

Hi all

When developing BizTalk 2009 solutions using Visual Studio .NET 2008 on Windows Server 2008, you run into issues when deploying from within Visual Studio .NET.

Now, first of all, as long as there are issues with BizTalk 2009 on Visual Studio .NET 2008, you should refrain from deploying from within Visual Studio .NET.

Secondly, when deploying on Windows Server 2008, you might run into this series of errors:

First error:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), followed by

Second error:

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)

Third error:

Unspecified exception: "
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Fourth error:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Fifth error:

Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

 

Now, usually, I must confess that my developer machines are usually virtual PCs, where I just login as the local administrator. If you do that, everything works fine. But in Windows Server 2008, Microsoft have introduced a new security system, where you need to approve it every time you start up some program that requires administrator rights – even if you are a member of the local administrators group.

So for instance, starting up BizTalk Server Administration console will cause this to appear:

user account control

And you have to click “Continue” to start it up.

The error above is because suddenly, even if you are a member of the local administrators group, you cannot add assemblies to the GAC.

You have three choices to fix it:

  1. Login with your username, but run Visual Studio .NET as an administrator. This is done by right clicking on the short cut for VS.NET and choosing “Run as administrator”.
  2. Login as administrator
  3. Turn off the “User Account Control”. This is done by entering “Control Panel” => “User Accounts”. Click on “Turn User Account Control on or off” – and in here you can turn it off. Now, when logged in as a user that i not the administrator, but who is a member of the local administrators group, you get the rights you usually have.

 

Hope this helps someone

--
eliasen

Tags:

Comments (2) -

Instead of turning UAC off you can right click MS Visual Studio 2008, choose Compatibility tab and check Privilege Level: Run this program as an Administrator (under Show settings for all users if you want this Privilege Level for all users).

Reply

Jan Eliasen
Jan Eliasen
09-06-2010 18:06:23 #

Hi

Thanks for the comment - I didn't know that.

--
eliasen

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List