Search code examples
asp.net-mvcvisual-studioiishttpsiis-10

Enabling https protocol in .NET MVC 5 application for localhost


I'm trying to enable https protcol for my application that I'm building on a localhost which has a port number like this:

https://localhost:19590/

enter image description here

I have went to the IIS xx express version and enabled https binding and have been able to access localhost (without any port number) via https like this:

https://localhost/

But now I need to enable HTTPS for the project solution I'm working on currently on port 19590, and when I try to access it, it says that the:

This site can’t provide a secure connection

What am I doing wrong here, how can I enable HTTPS for the localhost project on this port number exactly?


Solution

  • In your project properties, in the web section under Servers can you try choosing Local IIS instead of IIS Express and create virtual directory on https://localhost/