public override void OnActionExecuting(ActionExecutingContext filterContext)
{
HttpRequestBase Request = filterContext.HttpContext.Request;
HttpResponseBase Response = filterContext.HttpContext.Response;
if (!Request.IsSecureConnection && !Request.IsLocal)
{
var Builder = new UriBuilder(Request.Url);
Builder.Scheme = Uri.UriSchemeHttps;
Response.Redirect(Builder.Uri.ToString());
}
base.OnActionExecuting(filterContext);
}