I set using in my asp.net mvc application SSL Enabled = true (so now is https://localhost:63892/ and http://localhost:12555/, but when I run application via Debug, it said "Secure Connection Failed". What I'm doing wrong?
2 Answers
Make sure the self-signed certificate that Visual Studio generated is trusted. The certificate is called IIS Express Development Certificate
2 Comments
Ahashan Alam Sojib
I also had this problem. After
trusting the certificate, I was able to access with https in debug mode. But after deploying the app, I can't access with https. Any idea why?MvdD
@AhashanAlamSojib After deploying, the app lives on a different domain. You'll need a valid cert for that domain to be served.
Adding this in case if helps anyone: Using VisualStudio 2015, Windows 10, and IIS10 Express, even though I added the certificate I still wasnt able to access localhost over HTTPS. I resolved by uninstalling IIS10 Express and install IIS8 Express. I was then able to access localhost over HTTPS.
4 Comments
Alper Silistre
Can you able to find a proper solution for IIS10 Express? I'm having the same issue right now even though my certificate is trusted and SSL enabled in Visual Studio 2015.
ManiVI
unfortunately no, I have no clue as why.. so ended up using IIS8 express !
Alper Silistre
I found a solution to this problem on VisualStudio 2015 with IIS10 Express, I wrote an answer to this topic in case of anyone might face with the same issue, but it is removed because I didn't give enough details about the answer. Anyway, you can find the solution in this link: blog.lextudio.com/… Basically, chrome does not accept you default certificate for IIS Express 10 and you have to create a new one. This link provides a tool to make it easy and I could be able to solve this easily.
ManiVI
Thanks & sure, i will try that out !