public static IApplicationBuilder UseTaurusMvc(this IApplicationBuilder builder, IHostingEnvironment env) { AppConfig.WebRootPath = env.WebRootPath;//设置根目录地址,ASPNETCore的根目录和其它应用不一样。 //执行一次,用于注册事件 UrlRewrite url = new UrlRewrite(); url.Init(System.Web.HttpApplication.Instance); return(builder.UseMiddleware <TaurusMiddleware>()); }
public static IApplicationBuilder UseAries(this IApplicationBuilder builder, string webRootPath) { // builder. AppConfig.WebRootPath = webRootPath;//设置根目录地址,ASPNETCore的根目录和其它应用不一样。 //执行一次,用于注册事件 UrlRewrite url = new UrlRewrite(); url.Init(System.Web.HttpApplication.Instance); return(builder.UseMiddleware <AriesMiddleware>()); }
public static IApplicationBuilder UseTaurusMvc(this IApplicationBuilder builder, string webRootPath) { if (!string.IsNullOrEmpty(MicroService.Config.AppRunUrl) || MicroService.Server.IsRegCenterOfMaster) { MicroService.Run.Start(MicroService.Config.AppRunUrl);// } //System.Web.HttpContext.Configure(httpContextAccessor); AppConfig.WebRootPath = webRootPath;//设置根目录地址,ASPNETCore的根目录和其它应用不一样。 //执行一次,用于注册事件 UrlRewrite url = new UrlRewrite(); url.Init(System.Web.HttpApplication.Instance); return(builder.UseMiddleware <TaurusMiddleware>()); }