<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://involvenevolve.com/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Sudarshan's Blog</title>
    <link>http://involvenevolve.com/</link>
    <description>My Thoughts, Findings &amp; Experiences</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">2113</guid>
      <link>http://involvenevolve.com/post/iis-75-binding-wild-card-certificate-issue/</link>
      <category>Asp.Net</category>
      <category>IIS</category>
      <title>IIS 7.5 &amp; Binding Wild Card Certificate Issue</title>
      <description>&lt;p&gt;Recently we were working on Asp.Net MVC project which was going to be deployed on IIS 7.5. So, we installed a wildcard certificate on the web server which we can use for other sites under the same domain.&lt;/p&gt;
&lt;p&gt;But, when we tried associating the certificate withHost Name then it was NOT working. IIS was not allowing to enter value inHost Name field even though we have selected correct certificate.&lt;/p&gt;
&lt;p&gt;&lt;img style="width: 407px; height:222px;" src="http://involvenevolve.com/media/1056/iis-site-bindings.png?width=407&amp;amp;height=222" alt="Host name textbox is disabled" data-id="3118"&gt;&lt;/p&gt;
&lt;p&gt;We found some articles about how to associate hostname using commands.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.sslshopper.com/article-ssl-host-headers-in-iis-7.html"&gt;https://www.sslshopper.com/article-ssl-host-headers-in-iis-7.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/16276860/iis-7-adding-ssl-to-one-site-all-other-sites-responds-to-https-request"&gt;http://stackoverflow.com/questions/16276860/iis-7-adding-ssl-to-one-site-all-other-sites-responds-to-https-request&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If we go via approach specified in these articles then it works ONLY if website has a binding&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;with port 443 without the hostname&lt;/li&gt;
&lt;li&gt;with port 443 with the hostname&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this, you can't see the hostname is associated with a site when you try to edit the binding. BUT you can access a website using hostname just fine. Here is how IIS binding looks like&lt;/p&gt;
&lt;p&gt;&lt;img style="width: 751px; height: 236px;" src="http://involvenevolve.com/media/1058/website-bindings.png?width=751&amp;amp;height=236" alt="Both default and custom hostname bindings required" data-id="3120"&gt;&lt;/p&gt;
&lt;p&gt;Both default and custom hostname bindings required&lt;/p&gt;
&lt;p&gt;Now the drawback is: Even though you have wildcard certificate, you can't associate that to other websites on the IIS :(.&lt;/p&gt;
&lt;h6&gt;Real issue&lt;/h6&gt;
&lt;p&gt;Looks like IIS does not understand wild card certificate as wild card certificate unless it &lt;strong&gt;Friendly Name&lt;/strong&gt; starts with &lt;strong&gt;*.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In our case it's friendly name was &lt;em&gt;Wildcard certificate valid till XXXXX date&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So, you need to change the friendly name which will start with &lt;strong&gt;*.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To do this,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select Start –&amp;gt; Run&lt;/li&gt;
&lt;li&gt;Type in “MMC” and hit enter&lt;/li&gt;
&lt;li&gt;From the console, select File –&amp;gt; Add / Remove Snap-in&lt;/li&gt;
&lt;li&gt;Select Certificates from the Add / Remove dialog&lt;/li&gt;
&lt;li&gt;Select Computer Account when prompt for which certificates the snap-in will manage.&lt;/li&gt;
&lt;li&gt;Select Local Computer when prompted&lt;/li&gt;
&lt;li&gt;Click OK to add the Snap-in to the MMC&lt;/li&gt;
&lt;li&gt;Locate your SSL certificate&lt;/li&gt;
&lt;li&gt;Double click the certificate&lt;/li&gt;
&lt;li&gt;Select 'Details' tab and select 'Edit Properties'&lt;/li&gt;
&lt;li&gt;You should be able to change the friendly name.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img style="width: 400.3944773175543px; height:500px;" src="http://involvenevolve.com/media/1053/changed-friendly-name.png?width=400.3944773175543&amp;amp;height=500" alt="Change certificate friendly name" data-id="3115"&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Now, if you go back to IIS and try to add/edit bindings, you can now enterHost Name along with selecting wild card certificate&lt;/p&gt;
&lt;p&gt;&lt;img style="width: 408px; height:221px;" src="http://involvenevolve.com/media/1055/editable-host-name.png?width=408&amp;amp;height=221" alt="Hostname textbox is editbale in IIS" data-id="3117"&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Below article has good information about IIS and certificates:&lt;br&gt;&lt;a href="http://blogs.msdn.com/b/varunm/archive/2013/06/18/bind-multiple-sites-on-same-ip-address-and-port-in-ssl.aspx"&gt;http://blogs.msdn.com/b/varunm/archive/2013/06/18/bind-multiple-sites-on-same-ip-address-and-port-in-ssl.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now, you can also associate the same certificate with multiple websites on same IIS server!&lt;/p&gt;</description>
      <pubDate>Sat, 21 Feb 2015 21:32:25 Z</pubDate>
      <a10:updated>2015-02-21T21:32:25Z</a10:updated>
    </item>
  </channel>
</rss>