title: SSAS with Kerberos delegation gets connection timeout error
body: <p>I have a situation where clients connecting to my webservice(that exists on another server) must access SQL Server databases and SSAS servers.</p>
  
  <p>It must use the credentials of the client that is calling the service when accessing the SQL Servers and SSAS cubes.</p>
  
  <p>For this to work I do</p>
  
  <p>var winId = HttpContext.Current.User.Identity as WindowsIdentity;
  var ctx = winId.Impersonate();
  //Access Database/SSAS
  ctx.Undo();</p>
  
  <p>in my service which works fine when accessing SQL Server databases.</p>
  
  <p>However when I access the SSAS servers I get 
  "The connection either timed out or was lost"</p>
  
  <p>There are a number of posts like 
  <a href="http://denglishbi.wordpress.com/2009/03/31/windows-server-2008-kerberos-bug-%E2%80%93-transport-connection-issues-with-ssas-data/" rel="noreferrer">http://denglishbi.wordpress.com/2009/03/31/windows-server-2008-kerberos-bug-%E2%80%93-transport-connection-issues-with-ssas-data/</a>
  <a href="http://sqlblogcasts.com/blogs/drjohn/archive/2009/03/28/kerberos-kills-large-mdx-queries-on-windows-server-2008-ssas.aspx" rel="noreferrer">http://sqlblogcasts.com/blogs/drjohn/archive/2009/03/28/kerberos-kills-large-mdx-queries-on-windows-server-2008-ssas.aspx</a></p>
  
  <p>on this but I am using Windows Server 2008 R2 
  where my service lives so this should not be a problem as this bug should have been fixed by Microsoft.</p>
  
  <p>Any information as to how to best diagnose this problem would be appreciated.</p>
  
  <p>To clarify the SSAS servers do have SPNs. This was actually working at one point but has now stopped. Appears no sign of duplicate SPNs or anything.</p>
  
  <p>What is interesting is it works intermittently on one SSAS server but seems to work all the time for the other.
  They both have named SPNs as mentioned by this document</p>
  
  <p><a href="https://support.pyramidanalytics.com/entries/22056243-Configuring-Kerberos-Delegation-for-Named-Instances-of-SSAS-with-Active-Directory-and-additional-pro" rel="noreferrer">https://support.pyramidanalytics.com/entries/22056243-Configuring-Kerberos-Delegation-for-Named-Instances-of-SSAS-with-Active-Directory-and-additional-pro</a></p>