I didnt want to use ASP.NET MVC Authentication Manager (wanted something more simple, yet with some options i would like to add / remove) so I created a different one which uses Login Session
In my Administration Area I had created BaseController which I had planned all my child conrollers to inherit from him
And I had wondered how do I Redirect an unautherized Login from that BaseController
Here is an example:
public class BaseManagementController : Controller
{
protected override IAsyncResult BeginExecute(System.Web.Routing.RequestContext requestContext, AsyncCallback callback, object state)
{
//check if user logged in
if (!AuthenticateManager.IsLogged())
{
//if not logged, throw away
//how do i make this line work ?
}
//some other code
//default action
return base.BeginExecut ...
Go to the complete details ...