How to enable SSL project using Rider?

 

Hi,

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:

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

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

 

 

 

1
4 comments

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

 

 

0

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.

0

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

1

Please sign in to leave a comment.