Friday 24 August 2012

Cassini ultidev web server SLL failed to register website1 because System.ComponentModel.Win32Exception the operation completed successfully

So today I was setting up the latest Cassini UltiDev web server, version 4.65.0.0. The guys did a good job, the server is easy to use and functional. I used the default website of Microsoft WebMatrix and seemed fine. However, I run into a weird exception, the moment I tried to add an SSL certificate:

Failed to register Website1 because  System.ComponentModel.Win32Exception the operation completed successfully

Well, this doesn't make much sense... how can it fail and succeed at the same time? In any case, the https part of the site was not working. After a bit of digging around, I discovered that it was not registering the certificate with the port. The work around (windows server 2003) was to register this manually, with the command:

httpcfg set ssl -i 0.0.0.0:443 -h CERTHASHWITHOUTSPACESHERE

After that everything was fine. I hope this saves someone some time...

No comments: