I'm trying to force the use of SSL from my MVC WEB application.
I've tried with redirect in the global wing, but it goes into lopping too_many_redirects.
protected void Application_BeginRequest(Object source, EventArgs e)
{
if (!Context.Request.IsSecureConnection)
{
Response.Redirect(Request.Url.AbsoluteUri.Replace("http://", "https://"));
}
}
How can I force myself without falling into the redirect problem?