<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-AU"><title type="html">Darwin's Idle Times...</title><subtitle type="html">Living it up and Learning</subtitle><id>http://blogs.msdn.com/darwin/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/darwin/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2005-10-19T11:53:00Z</updated><entry><title>Replication troubleshooting...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2008/01/30/replication-troubleshooting.aspx" /><id>http://blogs.msdn.com/darwin/archive/2008/01/30/replication-troubleshooting.aspx</id><published>2008-01-29T20:32:00Z</published><updated>2008-01-29T20:32:00Z</updated><content type="html">&lt;P&gt;A customer has custom code that uses the Microsoft Provisioning Framework to do the following in their respective order:&lt;BR&gt;1)&amp;nbsp;Create a user&lt;BR&gt;2)&amp;nbsp;Create a Sharepoint site (When the Sharepoint site is created, roles are also created.)&lt;BR&gt;3)&amp;nbsp;Add the user created in 1) to a role defined for the Sharepoint Site created in 2)&lt;/P&gt;
&lt;P&gt;When the code executes 3) the following error occurs:&lt;/P&gt;
&lt;P&gt;MPF Response: System.Exception -&lt;/P&gt;
&lt;P&gt;&amp;lt;response&amp;gt;&lt;BR&gt;&amp;lt;errorContext description=" The user does not exist. 0x81020054" code="0x80131500" executeSeqNo="409"&amp;gt;&lt;BR&gt;&amp;lt;errorSource namespace="SharePoint Provider" procedure="AddUsersToRole"/&amp;gt;&lt;BR&gt;&amp;lt;errorSource namespace="Managed Sharepoint Hosting" procedure="AddUsersToRole"/&amp;gt;&lt;BR&gt;&amp;lt;errorSource namespace="COMET Hosting" procedure="CreateUser"/&amp;gt;&lt;BR&gt;&amp;lt;/errorContext&amp;gt;&lt;BR&gt;&amp;lt;/response&amp;gt;&lt;/P&gt;
&lt;P&gt;The customer needed assistance in successfully executing step 3)&lt;/P&gt;
&lt;P&gt;The issue is found to be related to AD synchronisation. When the Secured Channel for each Sharepoint Server is the same as the preferred domain controller in the MPS requests, the issue does not reproduce. If you are experiencing what appears to be the same issue in your environment, you might want to confirm using the following command:-&lt;/P&gt;
&lt;P&gt;netdom reset &amp;lt;target machine name&amp;gt; /Domain:&amp;lt;domain name&amp;gt; /Server:&amp;lt;preferred DC&amp;gt;&lt;/P&gt;
&lt;P&gt;If you are experiecing the same issue, you may want to consider changing the domain topology so that servers naturally point to the appropriate DC&lt;BR&gt;a.&amp;nbsp;Create a site in AD &lt;BR&gt;b.&amp;nbsp;Associate the subnet with the Sharepoint Servers to the new Site&lt;BR&gt;c.&amp;nbsp;Move the preferred DC to the new site&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7309679" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author></entry><entry><title>Re-Introduction</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2007/03/03/re-introducion.aspx" /><id>http://blogs.msdn.com/darwin/archive/2007/03/03/re-introducion.aspx</id><published>2007-03-02T21:04:00Z</published><updated>2007-03-02T21:04:00Z</updated><content type="html">&lt;P&gt;In case you are wondering where I have been or what I've been doing, I have left Syndey's sunny shores to live London on a kind of personal life experiences enrichment program :-). I'm just about settled in now in my new home, getting used to the colder weather, and getting into the swing of things in my new role. I am now an EMEA Solutions Escalation Engineer.&lt;/P&gt;
&lt;P&gt;So what on earth is a Solutions Escalation Engineer? The official title of my team is the Solutions Support Team. We are a member of the Premier Field Engineering Organization (PFE) in EMEA. I fancy describing our specific goal being to minimize the chances of solutions related issues occurring in production and to improve the availability of the solution system.&lt;/P&gt;
&lt;P&gt;The solutions that we work with can be classified as either one of two things. Microsoft Solutions or Custom Solutions. Microsoft Solutions include Hosted&amp;nbsp;Messaging and Collaboration, Connected Services framework, Windows Based Hosting etc. (You can find the complete list &lt;A class="" href="http://www.microsoft.com/serviceproviders/solutions/default.mspx" mce_href="http://www.microsoft.com/serviceproviders/solutions/default.mspx"&gt;here&lt;/A&gt;.) Custom solutions are those which may or may not have been developed by Microsoft consulting services and partners but meet our criteria of supportability.&lt;/P&gt;
&lt;P&gt;As you can imagine, Solutions Support covers a broad range of technologies. We collaborate closely as team, and work alot with our other colleagues in the PFE organisation as well as Customer Services Support to achieve our objectives with customers.&lt;/P&gt;
&lt;P&gt;My primary roles include providing support and delivering proactive services for HMC, CSF, and custom solutions. Proactive services activities include things like Supportability Reviews, Health Checks, and Compliancy Checks. Solutions Support also delivers workshops.&lt;/P&gt;
&lt;P&gt;So where to from here? In addition to developer support related blogs, you will start to see ones related to Microsoft Solutions such as HMC and CSF. Plus, my learnings over the custom solutions that we support. I hope you find some of my banter useful in someway.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1789043" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author></entry><entry><title>Authenticating via Kerberos against a web service using a C++ client...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2006/08/30/731319.aspx" /><id>http://blogs.msdn.com/darwin/archive/2006/08/30/731319.aspx</id><published>2006-08-30T10:53:00Z</published><updated>2006-08-30T10:53:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;I just thought this information might assist in expediting your research into the matter. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;When using the automatically generated proxy class template&amp;nbsp;that is created when referencing a web service from a C++ client application,&amp;nbsp;you may&amp;nbsp;define the proxy as per the following example:-&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#9acd32 size=2&gt;Service::CServiceT&amp;lt;&amp;gt; svc;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The template uses the&amp;nbsp;CSoapSocketClient class by default. This class only supports NTLM authentication with the web service.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;If you require that the C++ client application to authenticate via Kerberos with the web service. Use the CSoapWininetClient as per the following example when declaring the proxy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#9acd32 size=2&gt;Service::CServiceT&amp;lt;CSoapWininetClient&amp;gt; svc;&lt;BR&gt;CComBSTR str;&lt;BR&gt;CoInitialize(NULL);&lt;BR&gt;{&lt;BR&gt;HRESULT res = svc.HelloWorld(&amp;amp;str.m_str);&lt;BR&gt;this-&amp;gt;MessageBox(str.m_str,0,0);&lt;BR&gt;}&lt;BR&gt;CoUninitialize();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/vcsamSecureSOAPSample.asp"&gt;&lt;FONT size=2&gt;SecureSOAP Sample&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; may assist you further with implementing a C++ client against a web service.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=731319" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author><category term="Delegation" scheme="http://blogs.msdn.com/darwin/archive/tags/Delegation/default.aspx" /></entry><entry><title>Delegation and LDAP</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2006/03/29/563896.aspx" /><id>http://blogs.msdn.com/darwin/archive/2006/03/29/563896.aspx</id><published>2006-03-29T15:09:00Z</published><updated>2006-03-29T15:09:00Z</updated><content type="html">&lt;P&gt;A&amp;nbsp;customer had a requirement to pull pieces of&amp;nbsp;information about the browser user from AD in their web application. Accessible to the web application is the browser user's alias and the domain that the browser user belongs to. &lt;/P&gt;
&lt;P&gt;The customer achieves this in their development environment by doing a serverless bind to AD and using a DirectorySearcher object to look up the entry corresponding to the user. The following is sample code which illustrates what I mean:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#9acd32&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#9acd32 size=2&gt;string ldapPath = "LDAP://" + userDomain;&lt;BR&gt;DirectoryEntry rootEntry = new DirectoryEntry(ldapPath);&lt;BR&gt;using (DirectorySearcher ds = new DirectorySearcher(rootEntry, "(samAccountName=" + userName + ")"))&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SearchResult result = ds.FindOne();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (result != null)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultPropertyValueCollection resultValues = result.Properties["displayName"];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (resultValues.Count &amp;gt; 0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Label1.Text = (string) resultValues[0];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Label1.Text = "No display name";&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Upon migration of the application to the production environment, the application fails with a COM exception error code of 0x80072020. What could be the issue?&lt;/P&gt;
&lt;P&gt;When the customer accesses the web page at the web server, the customer does not encounter the error. When the customer sets the authentication of the web application to Basic Authentication and browses the web page from a remote machine, the web page also worked as expected after entering correct credentials.&lt;/P&gt;
&lt;P&gt;This evidence would suggest a Kerberos Delegation issue. &lt;/P&gt;
&lt;P&gt;However, the web application also accesses SQL server. We obtained SQL Server Profiler traces of the access and we were able to determine that the access is made under the browser user's account. We were able to deduce from this that the issue is isolated to accessing AD via Kerberos Delegation.&lt;/P&gt;
&lt;P&gt;The source of the issue is that the userDomain parameter supplied is the netbios name of the user's domain. &lt;STRONG&gt;What you should specify in the LDAP bind string is the Fully Qualified Domain Name (FQDN) of the domain&lt;/STRONG&gt;. In other words, you should use an LDAP bind string of the form LDAP://&amp;lt;FQDN&amp;gt;. For example, LDAP://department.company.com. &lt;STRONG&gt;This is &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnactdir/html/BuildingADApps.asp"&gt;best practice&lt;/A&gt; and is essential for Kerberos Delegation to work against AD.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If you want to determine the FQDN of a domain programmatically, the following sample code may assist:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#9acd32 size=2&gt;DirectoryEntry rootEntry = new DirectoryEntry("LDAP://" + userDomain + "/RootDSE");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;string strRoot = rootEntry.Properties["defaultNamingContext"].Value.ToString();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;string strFQDN = Regex.Replace(Regex.Replace(strRoot, @"DC=", ""),",",".");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;RootDSE allows Anonymous binds and gives you a means of obtaining the appropriate designations for objects in AD that you can use in your LDAP bind strings. The following articles explain RootDSE and may assist you with your choice of a method to bind to AD:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/serverless_binding_and_rootdse.asp"&gt;Serverless Binding and RootDSE&lt;/A&gt;&lt;BR&gt;&lt;A href="http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/en-us/AD/ad/binding_to_active_directory.asp"&gt;Binding to Active Directory&lt;/A&gt;&lt;BR&gt;&lt;A href="http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/en-us/AD/ad/binding_to_the_global_catalog.asp"&gt;Binding to the Global Catalog&lt;/A&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;If you are still encountering the symptoms that my customer experienced after changing the LDAP bind string to use the FQDN designation of the domain, seek the assistance of an expert in the domain or network infrastructure of your environment. This person is likely to be able to assist you with the correct FQDN to use and/or assist you in determining the FQDN dynamically.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=563896" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author><category term="Delegation" scheme="http://blogs.msdn.com/darwin/archive/tags/Delegation/default.aspx" /></entry><entry><title>Kerberos Authentication with IIS</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2005/10/28/486056.aspx" /><id>http://blogs.msdn.com/darwin/archive/2005/10/28/486056.aspx</id><published>2005-10-28T08:41:00Z</published><updated>2005-10-28T08:41:00Z</updated><content type="html">&lt;P&gt;So you have decided to go with the delegation security model for your application. You have been developing all of the tiers of your application on your single development box where everything worked according to expectations. You have now separated all of the tiers into separate boxes for testing because this is the deployment scenario in production.&lt;/P&gt;
&lt;P&gt;You have gone through the checklists in the Troubleshooting Kerberos Delegation article and made sure all the settings are correct. However, your multi-tier application is failing to flow the identity of the end user to the back end. Something is wrong, but where? &lt;/P&gt;
&lt;P&gt;Multi-tier applications that use Kerberos Delegation can be difficult to troubleshoot because it takes a single incorrect configuration setting or problem somewhere along the chain to stop the identity flow. The most logical place to start IMHO is the communication between the client and the first middle tier. Before any Kerberos Delegation can occur, the client and first middle tier must be correctly configured for Kerberos Authentication. &lt;/P&gt;
&lt;P&gt;A customer had IE as the client and a web application as the first middle-tier. To quickly learn if the client is authenticating via Kerberos, I asked the customer to create a "Negotiate Test" ASP page. The ASP code below is taken from "&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q314404"&gt;How To Use Kerberos with the ServerXMLHTTP Component in MSXML&lt;/A&gt;".&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#9acd32 size=1&gt;&amp;lt;HTML&amp;gt;&lt;BR&gt;&amp;lt;HEAD&amp;gt;&lt;BR&gt;&amp;lt;TITLE&amp;gt;Negotiate Test&amp;lt;/TITLE&amp;gt;&lt;BR&gt;&amp;lt;/HEAD&amp;gt;&lt;BR&gt;&amp;lt;!--&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This script is used to detect if the Negotiate method is using NTLM&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (windows NT Challenge-Response) or Kerberos as the authentication&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method.&lt;BR&gt;--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;lt;BODY&amp;gt;&lt;BR&gt;&amp;lt;%&lt;BR&gt;Dim AuthMethod&lt;BR&gt;Dim AuthType&lt;BR&gt;Dim AuthLength&lt;BR&gt;Dim AuthOther&lt;BR&gt;&amp;nbsp;&lt;BR&gt;' Get the authentication method being used&lt;BR&gt;AuthMethod = Request.ServerVariables("AUTH_TYPE")&lt;BR&gt;&amp;nbsp;&lt;BR&gt;' Get the length of the HTTP_Authorization header (to determine Kerberos or NTLM)&lt;BR&gt;AuthLength = Request.ServerVariables ("HTTP_Authorization")&lt;BR&gt;&amp;nbsp;&lt;BR&gt;' If some other authentication method (other than Negotiate) gets used, call it "Other"&lt;BR&gt;If LTrim(RTrim(AuthMethod)) &amp;lt;&amp;gt; "Negotiate" Then AuthOtherMethod&lt;BR&gt;&amp;nbsp;&lt;BR&gt;' If Negotiate gets used, go straight to the subroutine to handle it&lt;BR&gt;If LTrim(RTrim(AuthMethod)) = "Negotiate" Then AuthNegotiateMethod&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Sub AuthOtherMethod()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Since anonymous authentication will be blank, let's be sure we realize it's enabled to&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If LTrim(RTrim(AuthMethod)) = "" Then AuthMethod = "Anonymous"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write "&amp;lt;table width=500&amp;gt;The user was logged in using the &amp;lt;B&amp;gt;" &amp;amp; AuthMethod &amp;amp; "&amp;lt;/B&amp;gt; authentication method."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write "&amp;lt;P&amp;gt;&amp;amp;#xa0;&amp;amp;#xa0;&amp;amp;#xa0;&amp;amp;#xa0;If you were expecting a different method to be used,"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write " please check the settings for the resource you are accessing. Remember, selecting"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write " multiple authentication methods, or allowing anonymous access can result in a "&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write " different method being used.&amp;lt;/table&amp;gt;"&lt;BR&gt;End Sub&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Sub AuthNegotiateMethod()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Typically, NTLM will yield a 150 - 300 byte header, while Kerberos is more like 5000 bytes&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If LEN(AuthLength) &amp;gt; 1000 Then AuthType = "Kerberos"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If LEN(AuthLength) &amp;lt; 1000 Then AuthType = "NTLM"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write "&amp;lt;table width=500&amp;gt;The &amp;lt;B&amp;gt;Negotiate&amp;lt;/B&amp;gt; method was used!&amp;lt;BR&amp;gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Tell us the Authentication method used to authenticate the user (and show a warning about the script)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write "The user was logged on using &amp;lt;B&amp;gt;" &amp;amp; AuthType &amp;amp; "&amp;lt;/B&amp;gt;."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write "&amp;lt;P&amp;gt;&amp;lt;font color=#800000&amp;gt;&amp;lt;B&amp;gt;Please do not refresh this page&amp;lt;/B&amp;gt;&amp;lt;/font&amp;gt;.&amp;lt;BR&amp;gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write "&amp;amp;#xa0;&amp;amp;#xa0;&amp;amp;#xa0;&amp;amp;#xa0;If you do use refresh, &amp;lt;B&amp;gt;Kerberos&amp;lt;/B&amp;gt; will always show up as &amp;lt;B&amp;gt;NTLM&amp;lt;/B&amp;gt;."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write " This is because the HTTP_Authorization header is being used to determine the authentication method used."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write " Since the second request is technically unauthenticated, the length is zero. Please open a new browser"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write " for any subsequent requests.&amp;lt;/table&amp;gt;"&lt;BR&gt;End Sub&lt;BR&gt;%&amp;gt;&lt;BR&gt;&amp;lt;/BODY&amp;gt;&lt;BR&gt;&amp;lt;/HTML&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I asked the customer to situate this ASP page where his web application pages are physically located on his hard drive. If the ASP page is browsed, you can expect to see something like the following if there is Kerberos authentication between the client browser and IIS.&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;Negotiate&lt;/STRONG&gt; method was used! the user was logged on using &lt;STRONG&gt;Kerberos&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;One thing that compounds the difficulty of troubleshooting Kerberos delegation is some form of caching. It is such that you don't know sometimes if a configuration change has fixed the problem. Because a change appears to not have had an impact on the Kerberos delegation problem, you may be tempted to reverse the change and/or move on to check/change something else.&lt;/P&gt;
&lt;P&gt;When you are using IE to browse the "Negotiate Test" ASP, be sure to configure IE to check for newer versions of stored pages with every visit to the page. You can do that by using the following steps:&lt;/P&gt;
&lt;P&gt;1) On the Tools menu, click Internet Options. &lt;BR&gt;2) From the General tab, click Settings in the Temporary Internet Files panel. &lt;BR&gt;3) In the Settings dialog box, click to select Every visit to the page in the Check for newer versions of stored pages check box.&lt;/P&gt;
&lt;P&gt;Another thing to make sure about is that the browser sees the target web server as being in the Local Intranet Zone. This is easy to determine in IE by having a look at the bottom right hand corner of the IE Browser Window when you browse to "Negotiate Test" ASP. It should say "Local Intranet". If it doesn't say "Local Intranet" you can configure the browser to recognize the web server as a member of the Local Intranet Zone by using the steps in "&lt;A href="http://support.microsoft.com/?id=303650"&gt;Intranet site is identified as an Internet site when you use an FQDN or an IP address&lt;/A&gt;". Also, the Local Intranet zone within Internet Explorer needs to be set to "Automatic logon only in intranet zone". This setting can be changed within Internet Explorer by doing the following:&amp;nbsp; &lt;/P&gt;
&lt;P&gt;1) On the Tools menu, click Internet Options.&lt;BR&gt;2) Click on the Security Tab. &lt;BR&gt;3) Highlight Local Intranet and click on the Custom Level button. &lt;BR&gt;4) Scroll to the bottom of the window and change the setting under the User Authentication, Logon section.&lt;/P&gt;
&lt;P&gt;When the customer browsed to the "Negotiate Test" ASP, we quickly determined that NTLM authentication was occurring.&amp;nbsp;The customer has gone through the &lt;A href="http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerbdel.mspx"&gt;magic checklists&lt;/A&gt; but he did not set up the web server&amp;nbsp;machine. The machine has been used by other developers and administrators for various testing purposes so the settings on the Default Web Site may&amp;nbsp;have been tampered with. We checked the NTAuthenticationProviders setting under the Default Web Site and found&amp;nbsp;the setting to be&amp;nbsp;just "NTLM". By default, the NTAuthenticationProviders key is not defined and IIS uses "Negotiate,NTLM". Having "Negotiate,NTLM" means that it would try Negotiate method&amp;nbsp;first then NTLM second. For Kerberos Authentication, at least "Negotiate" has to be specified for the NTAuthenticationProviders.&lt;/P&gt;
&lt;P&gt;Because we did not want to interfere with what the other developers or administrators were doing, we created the NTAuthenticationProviders key under the relevant virtual directory node in the IIS Metabase&amp;nbsp;for the customer's web application.&amp;nbsp;We then&amp;nbsp;assigned this the value of "Negotiate". After this change, the "Negotiate Test" ASP page showed&amp;nbsp;Kerberos authentication. When we tested the actual web application pages after this change, it was evident that the identity of the end user was being flowed to the back end.&lt;/P&gt;
&lt;P&gt;You can set NTAuthenticationProviders for a specific virtual directory in the Default Web Site using something like the following command. Have a look also at "&lt;A href="http://support.microsoft.com/?id=215383"&gt;How to configure IIS to support both Kerberos and NTLM authentication&lt;/A&gt;" for another example and a corresponding output:&lt;/P&gt;
&lt;P&gt;cscript adsutil.vbs set w3svc/1/Root/&amp;lt;virtual Directory Name&amp;gt;/NTAuthenticationProviders "Negotiate,NTLM"&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=486056" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author><category term="Delegation" scheme="http://blogs.msdn.com/darwin/archive/tags/Delegation/default.aspx" /></entry><entry><title>To Delegate Or Not To...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2005/10/26/485078.aspx" /><id>http://blogs.msdn.com/darwin/archive/2005/10/26/485078.aspx</id><published>2005-10-26T12:08:00Z</published><updated>2005-10-26T12:08:00Z</updated><content type="html">&lt;P&gt;As part of my role at Microsoft, I sometimes&amp;nbsp;assist&amp;nbsp;customers in making design decisions with their applications. After understanding what the requirements are for the application, I&amp;nbsp;seek relevant information or resources&amp;nbsp;based on the requirements. Any relevant&amp;nbsp;information I find, I will forward to the customer and outline the advantages and disadvantages of the options available. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;One of the things I have been asked to assist on concern whether or not delegating the credentials of the end user to the backend resource in a multi-tier application is suitable. The following&amp;nbsp;is a list of advantages and disadvantages that I think applies under most scenarios. Some of the items are quoted directly from MSDN articles and some are from Microsoft Consultants that I have worked with.&amp;nbsp;I hope this will help you in making a decision as to whether or not Kerberos Delegation is appropriate security model for your application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Delegation Model Advantages&lt;/STRONG&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;The main advantages of the Delegation Model are the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;OL type=1&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;EM&gt;The resource is always accessed as the user. More specific security is enabled at a resource level rather than at the task level. Resource level security is also useful if the resource is accessed from outside the application (such as through a report generator). &lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;EM&gt;System level access auditing. Since all resources are accessed as the real user on all tiers of the system, you can enable system level access auditing on all tiers. This level of auditing can be very helpful when trying to meet new regulatory requirements for auditing and access reporting.&lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Delegation Model Disadvantages&lt;/STRONG&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;OL type=1&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;Performance. &lt;o:p&gt;&lt;/o:p&gt;
&lt;UL type=circle&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;&lt;EM&gt;No database connection pooling at the middle tier. This reduces scalability and performance&lt;/EM&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;Security. &lt;o:p&gt;&lt;/o:p&gt;
&lt;UL type=circle&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;&lt;EM&gt;Misuse of delegation could make the network vulnerable to sophisticated attacks using Trojan horse programs that impersonate incoming clients and use their credentials to gain access to network resources.&lt;/EM&gt;&lt;I&gt;&lt;BR&gt;&lt;/I&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconaspnetdelegation.asp"&gt;&lt;EM&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconaspnetdelegation.asp&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;. &lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;&lt;EM&gt;Direct user access available to resources. In some cases users may be able to directly access back-end resources using their normal credentials without going through the preferred application. For example, a user might use a SQL client to run commands directly against the database tier instead of through a business application.&lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;Complexity &lt;o:p&gt;&lt;/o:p&gt;
&lt;UL type=circle&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;&lt;EM&gt;The turnaround time for resolving issues can be lengthy. Assuming there is no problem on the domain/network, there is a checklist of necessary settings to verify for each tier in the architecture as well as Active Directory. &lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;&lt;EM&gt;Authorization may still need to be maintained on each of the middle tiers and introduce operational complexity. &lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;&lt;EM&gt;Not all tiers support the impersonation model for every scenario. A typical example is the back-end service that is hosted on a mainframe or other non-Microsoft server that does not support Kerberos protocol authentication.&lt;/EM&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;Useful Reference:&lt;/STRONG&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;The following article describes two architectures that you may employ, Delegation Architecture versus Trusted Subsystem, and lists the advantages and disadvantages of each.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Developing Identity-Aware ASP.NET Applications&lt;BR&gt;&lt;A href="http://www.microsoft.com/technet/security/topics/identity/idmanage/P3ASPD_1.mspx"&gt;http://www.microsoft.com/technet/security/topics/identity/idmanage/P3ASPD_1.mspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=485078" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author><category term="Delegation" scheme="http://blogs.msdn.com/darwin/archive/tags/Delegation/default.aspx" /></entry><entry><title>Kerberos Delegation to SQL Server</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2005/10/19/482593.aspx" /><id>http://blogs.msdn.com/darwin/archive/2005/10/19/482593.aspx</id><published>2005-10-19T11:41:00Z</published><updated>2005-10-19T11:41:00Z</updated><content type="html">&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;One of the most difficult issues to troubleshoot sometimes is a Kerberos Delegation issue to SQL Server. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;A customer had&amp;nbsp;a web application that is configured to access a remote back end SQL server under the security context of the end user. When users access the web application, the application displays an error similar to the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;“Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;On the web server, when we browse the web application, it works as expected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;Fortunately, we were able to deduce very quickly&amp;nbsp;that the middle tier is configured correctly for Kerberos Delegation. The customer had another SQL Server hosting the same database. When they pointed it to this server, it worked as expected. SQL Profiler showed that access is being made under the end user's account.&amp;nbsp;So the issue&amp;nbsp;appeared specific to&amp;nbsp;Kerberos&amp;nbsp;Delegation to the targeted SQL Server. What is it that is causing Kerberos Delegation to fail&amp;nbsp;against this one SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;There are a couple of things to check out, quite a few actually! The following link provides a comprehensive checklist for the SQL Server backend as well as troubleshooting tips:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;Troubleshooting Kerberos Delegation&lt;BR&gt;&lt;A href="http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerbdel.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerbdel.mspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;I believe that the above article provides all the information you need to be able to troubleshoot and resolve most of your Kerberos Delegation problems on the Windows platform.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;In the customer's environment,&amp;nbsp; both the working and the failing SQL Server services&amp;nbsp;are running under the same domain account. My immediate suspicion is an SPN problem.&amp;nbsp;During setup, SQL Server can be configured to run under the Local System account. When SQL Server Services are started on a machine, it tries to register a corresponding SPN in AD against the account that it is running under. If SQL Server is running under local system, the SQL Server SPN would be registered against the machine name. If SQL Server is running under a domain account, provided that account has enough rights to AD, SQL Server will register the SPN against that account.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;We verified that the correct SPNs&amp;nbsp;are registered against the domain account that SQL Server services is running under on the problem machine. I then had the customer check the SPNs against the machine name and found&amp;nbsp;SQL&amp;nbsp;Server SPNs registered against the machine account:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSSQLSvc/&amp;lt;Machine FQDN&amp;gt;:1433&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSSQLSvc/&amp;lt;Machine&amp;gt;:1433&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;Okay, so that is one configuration problem that we need to rectify. Using SETSPN, we deleted these entries but the problem persisted. What else could it be? Well, were not done with looking for duplicate SPN entries yet. There may be other accounts that the SPN may be registered to. We used the LDIFDE tool as per the article given to query AD for SPNs in an effort to weed out the problem. The following is the query that we used:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;ldifde -f ldif.txt -j c:\ -d &amp;lt;your domain&amp;gt; -l serviceprincipalname -r (serviceprincipalname=MSSQL*)"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;An example of&amp;nbsp;&amp;lt;your domain&amp;gt; is "DC=microsoft,DC=com,DC=au" (including the quotes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN style="mso-ansi-language: EN"&gt;The resulting ldif.txt file showed that the SPN assigned to the account that SQL Server services are running under is also assigned to another domain account. We removed that SPN as well and after that change we had success!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=482593" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author><category term="Delegation" scheme="http://blogs.msdn.com/darwin/archive/tags/Delegation/default.aspx" /></entry><entry><title>Introduction</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/darwin/archive/2005/10/19/482570.aspx" /><id>http://blogs.msdn.com/darwin/archive/2005/10/19/482570.aspx</id><published>2005-10-19T03:53:00Z</published><updated>2005-10-19T03:53:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Arial&gt;I've been working for Microsoft now for six years as a Developer Support Engineer. For me that's a long time. It is the constant learning that has kept me here. I hope to share some of that learning by posting&amp;nbsp;what I think are interesting customer problems and corresponding resolutions. Occasionally, I may write some meaningless banter.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=482570" width="1" height="1"&gt;</content><author><name>darwin</name><uri>http://blogs.msdn.com/members/darwin.aspx</uri></author></entry></feed>