ASP.NET MVC Redirect on Filter

Here’s the situation that you might encounter, you write your own custom filter to meet your need, for instance to perform checking whether a user is login on the system or not by checking the session, and if not then the user must be redirected to somewhere else safe(you decide).