Is there a way to change or specifically mention protocol on RedirectToAction from http to https

20 views Asked by At

Is there a way to change or specifically mention protocol on RedirectToAction from http to https. I have a RedirectToAction and I am returning base.RedirectToAction. For my requirement I need to force it to https protocol - is there a way to do it? I have search few links but, did not find a solution

protected internal new RedirectToRouteResult RedirectToAction(string actionName, string controllerName)
    {
        return string.IsNullOrEmpty(UKey) ? base.RedirectToAction(actionName, controllerName)
          : base.RedirectToAction(actionName, controllerName, new RouteValueDictionary { { "id", UKey } });           
    }     

   
0

There are 0 answers