private static void EnsureAreasWebConfigExists()
{
var config = System.Web.HttpContext.Current.Server.MapPath("~/areas/web.config");
if (!File.Exists(config))
{
throw new Exception("Portable Areas require a ~/Areas/Web.config file in your host application. Copy the config from ~/views/web.config into a ~/Areas/ folder.");
}
}