<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Care, Share and Grow! : Windows Server 2008</title><link>http://blogs.msdn.com/saurabh_singh/archive/tags/Windows+Server+2008/default.aspx</link><description>Tags: Windows Server 2008</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Required permissions when calling a Web service using client certificate for authentication in an ASP.NET Web application</title><link>http://blogs.msdn.com/saurabh_singh/archive/2009/07/03/required-permissions-when-calling-a-web-service-using-client-certificate-for-authentication-in-an-asp-net-web-application.aspx</link><pubDate>Fri, 03 Jul 2009 04:08:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9815515</guid><dc:creator>Saurabh Singh</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/saurabh_singh/comments/9815515.aspx</comments><wfw:commentRss>http://blogs.msdn.com/saurabh_singh/commentrss.aspx?PostID=9815515</wfw:commentRss><wfw:comment>http://blogs.msdn.com/saurabh_singh/rsscomments.aspx?PostID=9815515</wfw:comment><description>&lt;p&gt;A Web service requiring Client certificate authentication is a common scenario.&lt;/p&gt; &lt;p&gt;You may have a client application which needs to send the Client certificate as part of the web request for accessing the web service.&lt;/p&gt; &lt;p&gt;This client application may be a Windows/Console application or another Web application.&lt;/p&gt; &lt;p&gt;Often you will get into issues wherein you are able to send Client certificate as part of the web request from a windows/console app but not from another web app. The primary reason for this could often be around Web app not being able to send the client cert to the target Web service.&lt;/p&gt; &lt;p&gt;This can happen for multiple reasons, in particular account under which Web app is running doesn't have enough permissions to access the Client cert in its local certificate store.&lt;/p&gt; &lt;p&gt;Refer to this excellent &lt;a title="901183" href="http://support.microsoft.com/?id=901183" target="_blank"&gt;kb&lt;/a&gt; for this for more details.&lt;/p&gt; &lt;p&gt;In this post I want to highlight ways in which you can grant access to the Web application account to access the Client certificate in its local machine store.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;When we have to send client cert as part of the web service call from a web app we need to ensure that the client cert is installed in the Local Computer -&amp;gt; Personal Store on the local box (where Web app is running). By default you will see the client cert installed in the Local User Store for the user who requested and installed the cert on the machine. You need to ensure first that the client cert is installed on the Local Computer Store instead of the Local User Store and then follow any of the methods below to grant access to the private key for the account (under which your web app is running).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Method 1:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The above article &lt;a title="901183" href="http://support.microsoft.com/?id=901183" target="_blank"&gt;kb&lt;/a&gt; gives an example of granting access using the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=c42e27ac-3409-40e9-8667-c748e422833f&amp;amp;displaylang=en" target="_blank"&gt;Microsoft Windows HTTP Services Certificate Configuration Tool&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&amp;gt; WinHttpCertCfg.exe -g -c LOCAL_MACHINE\MY -s " &lt;var&gt;IssuedToName &lt;/var&gt;" -a " &lt;var&gt;AccountName &lt;/var&gt;"&lt;/b&gt;&lt;/p&gt; &lt;p&gt;for e.g. &lt;/p&gt; &lt;p&gt;&lt;b&gt;&amp;gt; WinHttpCertCfg.exe -g -c LOCAL_MACHINE\MY -s " &lt;var&gt;IssuedToName &lt;/var&gt;" -a "Network Service" &lt;/b&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;There are other ways in which you can achieve the same result. This feature is in fact built in on Windows Server 2008 within the Certificate mmc console.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Method 2:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Using the WSE X509 Certificate tool (This tool has features that can be used to check certificate properties).&lt;/p&gt; &lt;p&gt;You need to &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=1ba1f631-c3e7-420a-bc1e-ef18bab66122&amp;amp;displaylang=en" target="_blank"&gt;download&lt;/a&gt; Web Services enhancements (WSE) 2.0+ SP3 for Microsoft.Net and in the install wizard ensure you select Tools as shown below:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/4e6e8ea9250e_4A38/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="381" alt="image" src="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/4e6e8ea9250e_4A38/image_thumb.png" width="504" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Once installed go ahead and launch the tool. It has a clean UI. You have the option to check certificates in the Local Computer/Current user for the available stores like Personal/Trusted/Intermediate Root CA etc. If you click on View Private Key File Properties (shown below) you can directly modify the permission for private key associated with the certificate. Basically this is just a file under &lt;em&gt;C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys&lt;/em&gt; on Win2k3 server and&amp;nbsp; &lt;em&gt;C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys&lt;/em&gt; on Win2k8 server.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/4e6e8ea9250e_4A38/image_10.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="539" alt="image" src="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/4e6e8ea9250e_4A38/image_thumb_4.png" width="551" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You may want to go ahead and give the Service account under which the web app is running Full permission on this file (modify the permissions from the Security tab).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Method 3:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If you are running the web app on Windows Server 2008/Vista there is a far simpler way built in the Certificate mmc.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/4e6e8ea9250e_4A38/image_12.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="312" alt="image" src="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/4e6e8ea9250e_4A38/image_thumb_5.png" width="572" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Right click on the certificate and go to All Tasks -&amp;gt; Manage Private Keys and then give Full permission for the associated account.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Till next time..&lt;/p&gt; &lt;p&gt;Cheers!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9815515" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/ASP.Net/default.aspx">ASP.Net</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Client+Certificate/default.aspx">Client Certificate</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Setup/default.aspx">Setup</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Considering hosting Web based services on IIS 7.0?</title><link>http://blogs.msdn.com/saurabh_singh/archive/2009/03/10/considering-hosting-web-based-services-on-iis-7-0.aspx</link><pubDate>Tue, 10 Mar 2009 19:35:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9469280</guid><dc:creator>Saurabh Singh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/saurabh_singh/comments/9469280.aspx</comments><wfw:commentRss>http://blogs.msdn.com/saurabh_singh/commentrss.aspx?PostID=9469280</wfw:commentRss><wfw:comment>http://blogs.msdn.com/saurabh_singh/rsscomments.aspx?PostID=9469280</wfw:comment><description>&lt;p&gt;If you are contemplating to move over (upgrade) to IIS 7.0 from your existing Web hosting on either IIS 5.0 or 6.0 this is a very useful Technical White Paper link. It talks about various aspects of improvements in IIS 7.0 dealing with Management, Performance, Extensibility, Security and Deployment.&lt;/p&gt; &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc500981.aspx" target="_blank"&gt;Migrating a Large, High-Volume Web Site to Internet Information Services 7.0&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Cheers!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9469280" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/IIS+7.0/default.aspx">IIS 7.0</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>New features in SETSPN.EXE on Windows Server 2008</title><link>http://blogs.msdn.com/saurabh_singh/archive/2009/01/09/new-features-in-setspn-exe-on-windows-server-2008.aspx</link><pubDate>Fri, 09 Jan 2009 03:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9300964</guid><dc:creator>Saurabh Singh</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/saurabh_singh/comments/9300964.aspx</comments><wfw:commentRss>http://blogs.msdn.com/saurabh_singh/commentrss.aspx?PostID=9300964</wfw:commentRss><wfw:comment>http://blogs.msdn.com/saurabh_singh/rsscomments.aspx?PostID=9300964</wfw:comment><description>&lt;P&gt;The version of Setspn.exe that came with Microsoft Windows Server 2000/2003 Support Tools did not have features to detect duplicate SPNs. The new version of Setspn.exe that comes bundled with Windows Server 2008 utilities has some really cool features. For someone dealing with the dreaded Kerberos authentication failure issues on a daily basis like me it's a sigh of relief.&lt;/P&gt;
&lt;P&gt;If you try the following command on the Windows Server 2008 you will see the various new options (or switches) available.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/Refreshingfeature.EXEONWindowsServer2008_6D9/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/Refreshingfeature.EXEONWindowsServer2008_6D9/image_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=450 alt=image src="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/Refreshingfeature.EXEONWindowsServer2008_6D9/image_thumb.png" width=664 border=0 mce_src="http://blogs.msdn.com/blogfiles/saurabh_singh/WindowsLiveWriter/Refreshingfeature.EXEONWindowsServer2008_6D9/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Notice the modifiers/switches:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-F = perform the duplicate checking on forestwide level&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-S = add arbitrary SPN after verifying no duplicates exist&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-Q = query for existence of SPN&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-X = search for duplicate SPNs&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Searching for duplicate SPNs using Setspn.exe:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 74.96%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 125px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;D:\&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;setspn -X http/www.test.com
Processing entry 0
http/www.test.com is registered on these accounts:
    CN=mstest,CN=Users,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    CN=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;IIS-servername&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,OU=Domain Controllers,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt; 

found 1 group of duplicate SPNs.
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Searching for the existence of an SPN in the domain:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 75.15%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 205px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;D:\&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;setspn -Q http/www.test.com
CN=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;IIS-servername&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,OU=Domain Controllers,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    http/www.test.com
    ldap/2334590-45566-113f....
    HOST/&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;IIS-servername&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    HOST/&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;IIS-servername.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    .......
    .......
CN=mstest,CN=Users,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    http/www.test.com 

Existing SPN found!
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Adding an arbitrary SPN after verifying no duplicates exist in the domain: 
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 74.96%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 109px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;D:\&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;setspn -S http/www.test.com &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;IIS-servername&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
CN=mstest,CN=Users,.&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    http/www.test.com 

Duplicate SPN found, aborting operation!

&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Adding an arbitrary SPN after verifying no duplicates exist in the forest: 
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 75.15%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 141px; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;D:\&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;setspn -F -S http/www.test.com &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;IIS-servername&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
Operation will be performed forestwide, it might take a while.
CN=mstest,CN=Users,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    http/www.test.com
CN=mstest1,CN=Users,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-primary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;,DC=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;some-DC-secondary&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
    http/www.test.com 

Duplicate SPN found, aborting operation! 
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;So what does this mean? It means you no longer have to depend upon boggling commands using LDIFDE or your own custom scripts to find out the duplicate SPNs. This is a good news indeed!&lt;/P&gt;
&lt;P&gt;*Prior to this using Windows Server 2000/2003 Support Tools we could use commands using LDIFDE to find duplicate SPNs as below:&lt;/P&gt;
&lt;P&gt;Syntax:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 85.36%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 49px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;ldifde -f &lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt; -d "&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;dc&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #ff0000"&gt;domain-netbiosname&lt;/SPAN&gt;,&lt;SPAN style="COLOR: #ff0000"&gt;dc&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #ff0000"&gt;primary-domain&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;" -l serviceprincipalname -r "(serviceprincipalname=&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;serviceprincipalname-to-check-for-duplicates&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;)" -p subtree&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;For example, if the domain name is test.abcd.com and the site URL is http//test.abcd.com command should be as shown below: &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 85.25%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 39px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;ldifde –f C:\log.txt -d "dc=test, dc=abcd, dc=com"-l serviceprincipalname –r "(serviceprinicpalname=http/test.abcd.com)" -p subtree&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;With the newer version of Setspn hopefully the dependency on the above command should reduce drastically.&lt;/P&gt;
&lt;P&gt;Till next time,&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9300964" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Kerberos/default.aspx">Kerberos</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Setspn/default.aspx">Setspn</category><category domain="http://blogs.msdn.com/saurabh_singh/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item></channel></rss>