title: MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system "ServerName"
body: <p>I have a website application which is using Microsoft Data Transactions and it is based on .NET Framework 4.0 and SQL Server 2008 R2 Express Edition for the database, being deployed at Windows 2008 Server R2 which is a virtual server. The database and IIS are both at the same server.<br/><br/>
  The problem is that the error is occurring in the server event logs as:-
  MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system ‘ZEPHYR’. Zephyr is my Server’s name.<br/><br/>
  I have done almost all the things included in the two forum questions already:-
  <a href="http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/eb8835d9-5f5b-4df2-8c68-4a61d5e44d6b/" rel="noreferrer">http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/eb8835d9-5f5b-4df2-8c68-4a61d5e44d6b/</a> <br/>
  <a href="http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/13586ca7-f645-4ed7-96e8-ba03f66ef38b" rel="noreferrer">http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/13586ca7-f645-4ed7-96e8-ba03f66ef38b</a>
  <br/><br/>
  All things are working fine, but when executing the following command using the SUBINACL tool:-
  <br/></p>
  
  <pre><code>C:\Program Files (x86)\Windows Resource Kits\Tools&gt;subinacl /service msdtc /grant="Network Service"=QSETIL
  msdtc - OpenService Error : 5 Access is denied.
  
  
  Elapsed Time: 00 00:00:00
  Done:        1, Modified        0, Failed        1, Syntax errors        0
  Last Done  : msdtc
  Last Failed: msdtc - OpenService Error : 5 Access is denied.
  subinacl /service msdtc /grant="Network Service"=QSETIL 
  </code></pre>
  
  <p><br/><br/>
  But then I used the following ICACLS command to give access to this by using ICACLS command:-</p>
  
  <pre><code>icacls c:\windows\system32\msdtc\msdtc.log /grant admin:(d,wdac)
  </code></pre>
  
  <p><br/><br/>
  NOTE: ‘admin’ is my user for the Server. 
  But again it is not resolving the issue.
  The access rights for the msdtc.log file by the command :-</p>
  
  <pre><code>{“icacls c:\windows\system32\msdtc\msdtc.log”} are as follows:-
  C:\&gt;icacls c:\windows\system32\msdtc\msdtc.log
  c:\windows\system32\msdtc\msdtc.log NT AUTHORITY\NETWORK SERVICE:(F)
                                      ZEPHYR\Administrator:(D,WDAC)
                                      ZEPHYR\admin:(D,WDAC)
                                      BUILTIN\Administrators:(F)
                                      ZEPHYR\admin:(I)(F)
                                      NT AUTHORITY\SYSTEM:(I)(F)
                                      BUILTIN\Administrators:(I)(F)
                                      NT SERVICE\KtmRm:(I)(F)
                                      NT SERVICE\MSDTC:(I)(F)
  
  Successfully processed 1 files; Failed processing 0 files
  </code></pre>
  
  <p><br/><br/>
  As far as I have seen that there are very few forums where question about such an error is posted. <br/><br/>
  I would like to ask that how would I resolve this issue, since this error has caused a bottleneck and the Transactions are not working in those .aspx pages wherever implemented. Is there any work-around for this issue?</p>