Access denied when deploying BizTalk solutions from Visual Studio
There is a possibility to get various kind of access denied errors when deploying BizTalk solutions directly from Visual Studio. Here is my list of things to check if you are struggling to get past the errors.
By the way, if you are deploying your first BizTalk solution, you might also want to check the walkthrough of a basic deployment from MSDN (https://msdn.microsoft.com/en-us/library/aa559168(v=bts.80).aspx).
- Make sure you have administrator rights on the server and you run Visual Studio as administrator. This is required because BizTalk assemblies are deployed into GAC (https://msdn.microsoft.com/en-us/library/yf1d93sz.aspx).
- Make sure your user account is member of BizTalk Server Administrators group and also member of SSO Administrators or SSO Affiliate Administrators group. These memberships should grant you required access to the database.
- Verify that your deployment configuration is correct by right-clicking the project in Visual Studio and selecting "Properties". Check that values for "Application Name", "Configuration Database" and "Server" are what you expect them to be. Note that the value of the "Server" should be the name of the SQL Server instance that hosts the Configuration Database.
- Make sure you have AssemblyInfo.cs file included in your project and it contains this line:
[assembly: Microsoft.XLANGs.BaseTypes.BizTalkAssembly(typeof(Microsoft.BizTalk.XLANGs.BTXEngine.BTXService))]
- When everything else is checked, you might also want to check if some other process has a lock on the file(s) you are trying to replace. This can be done for example with Process Monitor (https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) by using "Find" -> "Find Handle or DLL" -> Enter path and filename of the DLL being updated. At least search indexing services or virus scanners might acquire these kind of locks which prevent you from replacing the file. Stopping these services while deploying should help.