9

I understand that IIS stores binding information in applicationhost.config file. However, in that file it does not store such information which would tell which SSL certificate is bound to which binding for a specific site.

I have a site named example.com which has several SSL bindings. I don't have a wildcard SSL certificate, just a SAN certificate corresponding to each of the subsdomainxxx.example.com

Now the problem is setting the bindings one by one is cumbersome and hard. Is there a way to programming set a specific certificate for all SSL protocol bindings for a given site?

Preferably, using command prompt. The process could become much easier too if I need where I could edit these mappings in some config file (such as applicationhost.config) for SSL bindings for more sites that I have on my server.

Any help is appreciated.

2
  • 10
    Location is HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\Ssl*BindingInfo, To set a new certificate, look into: netsh http add sslcert hostnameport=www.my.site:443 certhash=$certthumbprint appid={someguid} certstorename=MY lots of examples out there. Commented Oct 22, 2016 at 7:13
  • Jexus Manager is open source and you can find the related code from its binding related part, jexusmanager.com Commented Oct 24, 2016 at 1:27

1 Answer 1

0

Just for the record, check out the following article. There are bunch of different way to do it.

https://learn.microsoft.com/en-us/iis/manage/configuring-security/how-to-set-up-ssl-on-iis

Programmatically you can do it using C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll library, which also has .NET wrapper: https://www.nuget.org/packages/Microsoft.Web.Administration/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.