Once again Skype caught me out when trying to configure a test site for SSL and so this time around I thought I would blog about it and hopefully a) it would stick in my memory and b) someone else would avoid the pain of debugging this issue.
If you are trying to setup a Web Site in IIS for SSL you make find that as soon as you add the binding for https and try starting your website you end up getting the error ‘Exception from HRESULT: 0x80070020’ shown below:
Really annoying and not very helpful guys
So how to fix it and why is it happening?
Well in my case Skype was the culprit causing the issue as by default when you install Skype it uses port 80 and 443 as alternatives for incoming connections.
Fortunately this can be turned off under Tools|Options|Advanced|Connection
Just un-tick that box shown below.
Once you do that you should find that you can now start the Web Site successfully with SSL configured.
Now the actual issue is that port 80 is being used by something other than IIS so it may not be Skype that is the problem.
If it is not then do the following to determine what is.
Open a Command Prompt Window
At the command prompt type ‘netstat –ano’ and hit Enter
You should get a listing like this one:
Take note of the PID that is bound to 0.0.0.0:80 and close the command prompt.
Open Task Manager and select the Processes tab.
If you don’t see the column PID then go to the View|Columns menu and tick ‘PID (Process Identifier) and OK.
Now look for the PID you noted in step 4
That will be the culprit that is stopping your IIS Web Site starting when bound to HTTPS.
Hope that saves someone out there 10 minutes.