/// <summary> /// Initializes the <see cref="MvcSiteMapProviderViewEngine"/> class. /// </summary> static MvcSiteMapProviderViewEngine() { ViewEngines.Engines.Insert(ViewEngines.Engines.Count, new MvcSiteMapProviderViewEngine()); try { var pathProvider = new MvcSiteMapProviderViewEngineVirtualPathProvider(); HostingEnvironment.RegisterVirtualPathProvider(pathProvider); } catch (SecurityException) { // Partial trust... No support for this! } }