With all these new security features present on the latest Microsoft operating systems, don’t get me wrong they are good, sometimes our life as BizTalk Developers seems like it’s reversing and becoming a nightmare, especially if you are a consultant working with multiple different clients, environments, and projects.
Most of the times I start developing a new project at a new client, the first time I try to deploy a solution I get an “Error 87 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))…” error message.
There are several possible causes for you to get such Access Denied errors when deploying BizTalk solutions directly from Visual Studio. Most common is that you don’t have the right BizTalk privileges to deploy artifacts, or in other words, you are not a local Administrator.
But most of the time is simpler than that and indeed is related with these additional securities setting present in recent Windows Server versions. For you to be able to successfully deploy a BizTalk Server solution directly from Visual Studio, you must run Visual Studio as an Administrator, or with elevated permissions, because BizTalk assemblies need to be deployed into the GAC. What normally happens, is that if you have User Account Control (UAC) activated, or sometimes even deactivated, there are some additional securities setting present in recent Windows Server versions that, by default, doesn’t run Visual Studio with elevated permissions.
The quick solution is for you to run Visual Studio as an Administrator by simply run below step:
- Right-click under Visual Studio and choose “Run as administrator” option.
The problem with this approach is that you need to remember yourself to do it every time you want to run Visual Studio, otherwise the next time you try to deploy the solution it will fail again with the same error.
How to properly address this problem?
Actually, this problem can be simply addressed by:
- Access the devenv.exe file on the file system, which is by default installed in: “C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDE”
- Right-click devenv.exe and select “Troubleshoot compatibility”
- On the “Select troubleshooting option” page, select “Troubleshoot compatibility” option
- On the “What problems do you notice?” page, select the “The program requires additional permissions” option and then click “Next”
- On the “Test compatibility settings for the program” page, click “Test the program…”, wait for the program to launch and then click “Next”
- Select “Yes, save these settings for this program”
- Click “Close”
You will never face this problem again… at least at that client.
Enjoy and Stay tuned for new BizTalk Server Tips and Tricks!