Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Can't debug web app in VS 2015 after HSTS

$
0
0

Hi,

I implemented an HSTS (HTTP Strict Transfer Security) in our web server 2008 R2 host to comply with our IT requirements.

However, after doing that, I can't debug my MVC web apps running in the server.  It gives me the following error in Firefox browser:
    "Secure Connection Failed: Error code:  SSL_ERROR_RX_RECORD_TOO_LONG"

Is there some other step I missed in configuring the server?  I added the following method in my Global.asax.cs:

protected void Application_BeginRequest()
{
    if (!Context.Request.IsSecureConnection)
    {
      Response.Redirect(Context.Request.Url.ToString().Replace("http:", "https:"));
    }
}

Appreciate any advice.


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>