How to enable SSL project using Rider?



I already have a solution that uses "SSL Enabled = True" defined in your Web Project at Visual Studio 2015 like the image below:

And I have in my Web.Config the following command rewriting to HTTPS:

<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<add input="{HTTPS}" pattern="off" />
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />

But when I run the project under Rider the IIS Express does not know how to handle HTTPS protocol and I got this message:

error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol





Just another information: I found at <project dir>/.idea/config/applicationhost.config

And I change "http" to https in the line below:

          <binding protocol="https" bindingInformation="*:5001:localhost" />

And after that the error is:

Unknown SSL protocol error in connection to localhost:5001




Joao, Mohamed Almohsen: I am sorry, but could you please share a project that works for you in Visual Studio? I wasn't able to make it work with your configuration and <rewrite> config section. For some reason, it always shows as ERR_INVALID_REDIRECT in my browser.


It has been 2 years I am not working with .NET, sorry. Mohamed Almohsen if you could add more information here. 


Please sign in to leave a comment.