Is it possible to somehow route all views to one particular view? I would like to have an "Under Construction view" that is always the default view until i "flip a switch" without having to build. Until then all other controller action routes to this view.
I would love to know if i can do it in web.config or if i have to have some if/else in RegisterRoutes in Global.asax.
Place a file called
app_offline.htm
into the root of your directory and this will be displayed for all requests.Once you remove (or rename) this file your web requests will be processed as usual again.
you can write a custom filter attribute that reads a flag from web.config and redirect requests to under construction page.
and you have to add key to web.config file
and you have to add this filter to global action filter collection in global.asax file