i would like to ask if c# or mvc has a easy way to redirect user back to the page they came from if they are try to enter a unauthorized page and have to login?

I already have a very huge web app and i´m a litte bit too lazy to overwork every single method with a direction string to it´s page for the case of unauthorization. So if it is possible i would like to choose another way, more resitent for changes.

For authorization at moment i use a custom class inherited from AuthorizeAttribute:

```
public class CustomAuthorizationAttribute : AuthorizeAttribute
{
    public RolesEnum[] RequiredRoles;

    protected override bool AuthorizeCore(HttpContextBase httpContext)
    {
        if (httpContext == null) throw new ArgumentNullException("httpContext");
        if (!httpContext.User.Identity.IsAuthenticated) return false;
        if (RequiredRoles.Contains(AzaraSession.Current.UserComparison.GetRole())) return true;
        else return false;
    }
}

```