Hi, I am making a web application and it needs to run under SSL.
For that reason, I have switched in Visual Studio the option SSL Enabled.
Once I did that I got the following dialog box asking me if I want a self-signed certificate by IIS Express
I replied with Yes and IIS Express generated a self-signed certificate that it has been added in my personal certificates, i have moved the certificate to Trusted Root Certificates as shown below
Once I did that everything worked as expected !!!
I have to mention that at the time I have runned the following code : netsh http show sslcert
and I have seen that IIS Express made bindings to the ports 44300 until 44399
below are partially shown the results of my query
Now the fun part starts, suddenly my pc shut down from kernel 41 error (probably a problem with my PSU (this is another story :) ))
when the computer restarts I try to use the SSLURL but I get the following error: ERROR_CONNECTION_RESET - the site does not even loads.
Therefore, I re-run the command: netsh http show sslcert
this time I only got one binding as shown below :
Since my SSL website has a binding on a port between 44300 - 44399 the above binding is useless therefore i think I found why my SSLURL is not showing up.
Moving forward, I have decided that I have to manually bind the previously generated SSL certificate to the port that my website uses for this example lets say port 44314.
therefore I use the following command from CLI: netsh http delete sslcert ipport=0.0.0.0:44314
Once deleted the entry succesfully I tried to make a new binding using the following command :
netsh http add sslcert ipport=0.0.0.0:44314 certhash=7d5ca4a11949712b0a24685a13066f9c29c9c9ef appid={214124cd-d05b-4309-9af9-9caa44b2b74a}
Certhash and Appid are the ones' used before by IIS Express for my certificate.
I received the following error:
SSL Certificate add failed,Error:1312
A specified logon session does not exist. It may already have been terminated.
I don't know how to move forward and I need my site to run on SSL (in the development environment). I have disabled and re-enable the SSL Option from the visual studio hoping to get again the message shown in the second picture
of this post. Unfortunately IIS had never asked me again for a new self-signed certificate.
Ps: I have tried to repair IIS in an effort to recreate the bindings but that has not helped either.
Ps2: I tried the following command : IisExpressAdminCmd.exe setupsslUrl -url:urlofYourSite -UseSelfSigned but is not working
Do I need to set up a FULL IIS?