Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi :)
I just activated HTTPS and edited my web.config rules. Build and Deployed, and the online site works perfectly with HTTPS forced.
<rule name="Redirect to https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" /> </rule>
The question is: How can i enable/bypass https on localhost?
I can't access https://localhost:51713/, which I'm now being redirected to instead of localhost:51713/
https://localhost:51713/
localhost:51713/
This site can’t provide a secure connection localhost sent an invalid response. Try running Windows Network Diagnostics. ERR_SSL_PROTOCOL_ERROR
Thanks in advance,
/ Anders
If you're using visual studio and local IIS then there's an option to enable HTTPS in it - see http://dailydotnettips.com/2014/01/27/enabling-ssl-with-iis-express-in-visual-studio/
If you're using full IIS on local machine you could probably create a self-signed certificate.
Otherwise if you just wish to bypass then check this answer on StackOverflow: https://stackoverflow.com/questions/20947773/rewrite-rule-to-https-except-when-on-localhost
Hi Dan
Thanks for answering my question.
I couldn't fint the settings in Visual Studio, where I could enable HTTPS, as you mentioned in your first solution.
But your last solution led me to another stackoverflow solution that did the trick.
Here is my end result:
<rule name="Redirect to https" enabled="true" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="off" /> <add input="{HTTP_HOST}" pattern="localhost" negate="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" /> </rule>
Nice, glad you got there in the end! I'm going to make a note of that :)
Strange you couldn't find it in VS - it's in my 2015 and 2017 editions.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Activated HTTPS, how to access https://localhost?
Hi :)
I just activated HTTPS and edited my web.config rules. Build and Deployed, and the online site works perfectly with HTTPS forced.
The question is: How can i enable/bypass https on localhost?
I can't access
https://localhost:51713/
, which I'm now being redirected to instead oflocalhost:51713/
Thanks in advance,
/ Anders
If you're using visual studio and local IIS then there's an option to enable HTTPS in it - see http://dailydotnettips.com/2014/01/27/enabling-ssl-with-iis-express-in-visual-studio/
If you're using full IIS on local machine you could probably create a self-signed certificate.
Otherwise if you just wish to bypass then check this answer on StackOverflow: https://stackoverflow.com/questions/20947773/rewrite-rule-to-https-except-when-on-localhost
Hi Dan
Thanks for answering my question.
I couldn't fint the settings in Visual Studio, where I could enable HTTPS, as you mentioned in your first solution.
But your last solution led me to another stackoverflow solution that did the trick.
Here is my end result:
Nice, glad you got there in the end! I'm going to make a note of that :)
Strange you couldn't find it in VS - it's in my 2015 and 2017 editions.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.