public override string GetWebRootPath() { if (app == null) return base.GetWebRootPath(); var env = app.ApplicationServices.GetService<IHostingEnvironment>(); return env.WebRootPath ?? env.ContentRootPath; }