Boy_Scouts_Scheduler.MvcApplication.Application_BeginRequest C# (CSharp) Method

Application_BeginRequest() protected method

protected Application_BeginRequest ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void
        protected void Application_BeginRequest(object sender, EventArgs args)
        {
            HttpCookie cookie = HttpContext.Current.Request.Cookies["Event"];
                if ((cookie == null || string.IsNullOrEmpty(cookie.Value)) &&
                    (Request.Path.StartsWith("/Group") || Request.Path.StartsWith("/Schedule")
                    || Request.Path.StartsWith("/SchedulingConstraint") || Request.Path.StartsWith("/Station")
                    || Request.Path.StartsWith("/TimeSlot")))
                {
                    if (HttpContext.Current.Request.Cookies[".ASPXAUTH"] != null)
                    {

                        HttpContext.Current.Response.Redirect("/home/welcome");
                    }
                    else
                    {
                        HttpContext.Current.Response.Redirect("/Account/LogOn");
                    }
                }
        }