public override void OnConfigLoad() { if (app != null) { //Initialize VFS var env = app.ApplicationServices.GetService <IHostingEnvironment>(); Config.WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath; AppHostBase.RegisterLicenseFromAppSettings(AppSettings); } }
public override void OnConfigLoad() { base.OnConfigLoad(); if (app != null) { //Initialize VFS var env = app.ApplicationServices.GetService <IHostingEnvironment>(); Config.WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath; Config.DebugMode = env.IsDevelopment(); //Set VirtualFiles to point to ContentRootPath (Project Folder) VirtualFiles = new FileSystemVirtualFiles(env.ContentRootPath); AppHostBase.RegisterLicenseFromAppSettings(AppSettings); Config.MetadataRedirectPath = "metadata"; } }
public virtual void Bind(IApplicationBuilder app) { this.app = app; if (pathBase != null) { this.app.UsePathBase(pathBase); } var env = app.ApplicationServices.GetService <IHostingEnvironment>(); WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath; Config.DebugMode = env.IsDevelopment(); AppHostBase.RegisterLicenseFromAppSettings(AppSettings); Container.Adapter = new NetCoreContainerAdapter(app.ApplicationServices); app.Use(ProcessRequest); }