<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/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/" xmlns:cs="http://blogs.iis.net/"><channel><title>Sunday Morning Musings on IIS : Private Key</title><link>http://blogs.iis.net/lprete/archive/tags/Private+Key/default.aspx</link><description>Tags: Private Key</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Assign a private key to a new certificate after you use the Certificates snap-in to delete the original certificate in Internet Information Services </title><link>http://blogs.iis.net/lprete/archive/2007/11/25/assign-a-private-key-to-a-new-certificate-after-you-use-the-certificates-snap-in-to-delete-the-original-certificate-in-internet-information-services.aspx</link><pubDate>Sun, 25 Nov 2007 21:30:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2024407</guid><dc:creator>lprete</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/lprete/rsscomments.aspx?PostID=2024407</wfw:commentRss><comments>http://blogs.iis.net/lprete/archive/2007/11/25/assign-a-private-key-to-a-new-certificate-after-you-use-the-certificates-snap-in-to-delete-the-original-certificate-in-internet-information-services.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;Often users will make the request for a new certificate then reinstall an older cert while waiting on the new one, this breaks the link that IIS keeps with the location of the Private key.&amp;nbsp; When installing the new Cert IIS (the certificate wizard) will report that is cannot find the Private Key. This relationship can repaired by using CertUtil.exe. &lt;/P&gt;
&lt;P mce_keep="true"&gt;To assign the existing private key to a new certificate, you must use the Microsoft Windows Server 2003 version of Certutil.exe. To do this, follow these steps: 
&lt;TABLE class="list ol" class="list ol"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;1.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;Log on to the computer that issued the certificate request by using an account that has administrative permissions.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;2.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;Click &lt;STRONG class=uiterm&gt;Start&lt;/STRONG&gt;, click &lt;STRONG class=uiterm&gt;Run&lt;/STRONG&gt;, type &lt;SPAN class=userInput&gt;mmc&lt;/SPAN&gt;, and then click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;3.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;On the &lt;STRONG class=uiterm&gt;File&lt;/STRONG&gt; menu, click &lt;STRONG class=uiterm&gt;Add/Remove Snap-in&lt;/STRONG&gt;. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;4.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the &lt;STRONG class=uiterm&gt;Add/Remove Snap-in&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;Add&lt;/STRONG&gt;. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;5.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;Click &lt;STRONG class=uiterm&gt;Certificates&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Add&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;6.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the &lt;STRONG class=uiterm&gt;Certificates snap-in&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;Computer account&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Next&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;7.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the &lt;STRONG class=uiterm&gt;Select Computer&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;Local computer: (the computer this console is running on)&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Finish&lt;/STRONG&gt;. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;8.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;Click &lt;STRONG class=uiterm&gt;Close&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;9.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the Certificates snap-in, expand &lt;STRONG class=uiterm&gt;Certificates&lt;/STRONG&gt;, right-click the &lt;STRONG class=uiterm&gt;Personal&lt;/STRONG&gt; folder, point to &lt;STRONG class=uiterm&gt;All Tasks&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Import&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;10.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;On the Welcome to the Certificate Import Wizard page, click &lt;STRONG class=uiterm&gt;Next&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;11.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;On the &lt;STRONG class=uiterm&gt;File to Import&lt;/STRONG&gt; page, click &lt;STRONG class=uiterm&gt;Browse&lt;/STRONG&gt;. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;12.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the &lt;STRONG class=uiterm&gt;Open&lt;/STRONG&gt; dialog box, click the new certificate, click &lt;STRONG class=uiterm&gt;Open&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Next&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;13.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;On the &lt;STRONG class=uiterm&gt;Certificate Store&lt;/STRONG&gt; page, click &lt;STRONG class=uiterm&gt;Place all certificates in the following store&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Browse&lt;/STRONG&gt;. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;14.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the &lt;STRONG class=uiterm&gt;Select Certificate Store&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;Personal&lt;/STRONG&gt;, click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;, click &lt;STRONG class=uiterm&gt;Next&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Finish&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;15.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the Certificates snap-in, double-click the imported certificate that is in the Personal folder.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;16.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the &lt;STRONG class=uiterm&gt;Certificate&lt;/STRONG&gt; dialog box, click the &lt;STRONG class=uiterm&gt;Details&lt;/STRONG&gt; tab. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;17.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;Click &lt;STRONG class=uiterm&gt;Serial Number&lt;/STRONG&gt; in the Field column of the &lt;STRONG class=uiterm&gt;Details&lt;/STRONG&gt; tab, highlight the serial number, and then write down the serial number. &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;18.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;Click &lt;STRONG class=uiterm&gt;Start&lt;/STRONG&gt;, click &lt;STRONG class=uiterm&gt;Run&lt;/STRONG&gt;, type &lt;SPAN class=userInput&gt;cmd&lt;/SPAN&gt;, and then click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;19.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;At the command prompt, type the following:&lt;BR&gt;&lt;SPAN class=userInput&gt;certutil -repairstore my "&lt;VAR&gt;SerialNumber&lt;/VAR&gt;"&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;VAR&gt;SerialNumber&lt;/VAR&gt; is the serial number that you wrote down in step 17.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;20.&lt;/TD&gt;
&lt;TD class=text class="text"&gt;In the Certificates snap-in, right-click &lt;STRONG class=uiterm&gt;Certificates&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Refresh&lt;/STRONG&gt;. &lt;BR&gt;&lt;BR&gt;The certificate now has an associated private key.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;You can now use the IIS MMC to assign the recovered keyset (certificate) to the Web site that you want.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2024407" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/lprete/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.iis.net/lprete/archive/tags/Certificates/default.aspx">Certificates</category><category domain="http://blogs.iis.net/lprete/archive/tags/SSL/default.aspx">SSL</category><category domain="http://blogs.iis.net/lprete/archive/tags/Private+Key/default.aspx">Private Key</category></item></channel></rss>