We are building automated deployment on Azure using the WebSite Management SDK. We currently managed to add hostnames to a Web App via code.
using (websiteClient)
{
var configuration = websiteClient.WebSites.Get(webspace, WebsiteName + "-" + Version, new WebSiteGetParameters());
configuration.WebSite.HostNames.Add(ClientName + "." + DnsZoneName);
var response = websiteClient.WebSites.Update(webspace, WebsiteName + "-" + Version, new WebSiteUpdateParameters() { HostNames = configuration.WebSite.HostNames });
}
But we cant get the HostNameSslStates to work properly. In a simular fashion we try to Add the SSL State for this website.
configuration.WebSite.HostNameSslStates.Add(new WebSite.WebSiteHostNameSslState() { Name = ClientName + "." + DnsZoneName, SslState = WebSiteSslState.SniEnabled, Thumbprint = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" });
But this doent result in a SSL binding on the Azure portal.
Anybody who has any experience / Code samples on how to add adjust the SSL State of this HostName?