boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

ASP.NET MVC: Implement Maintenance Mode

Updated on     Kisan Patel

Problems:

How to take an ASP.NET MVC web site “Down for maintenance”?
Implement “Down for maintenance” page.
Web site Maintenance Page ASP.NET MVC.
How to put your site into “maintenance mode”?

Solution

public class MvcApplication : System.Web.HttpApplication
{

       public static void RegisterGlobalFilters(GlobalFilterCollection filters)
       {
            filters.Add(new CheckForDownPage());

       }

        //the rest of your global asax
        //....
}

public class CheckForDownPage : ActionFilterAttribute
{
       public override void OnActionExecuting(ActionExecutingContext filterContext)
       {
             var path = System.Web.Hosting.HostingEnvironment.MapPath("~/Down.htm");

             if (System.IO.File.Exists(path) && IpAddress != "1.2.3.4")
             {
                    filterContext.HttpContext.Response.Clear();
                    filterContext.HttpContext.Response.Redirect("~/Down.htm");
                    return;
             }

              base.OnActionExecuting(filterContext);
        }
}

ASP.NET MVC

Leave a Reply