Reputation: 14399
When I redirect like this way
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
filterContext.Result = new RedirectResult("https://mydom.com");
}
so the browser redirects to http://mydom.com/httpS://mydom.com
but if I redirect this way
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
var res = filterContext.HttpContext.Response;
filterContext.Result = res.Redirect("https://mydom.com");
}
so the browser redirect correctly to https://mydom.com
Why there is the difference?
Upvotes: 6
Views: 3721