任务25:IHostEnvironment和 IApplicationLifetime介绍

 

IHostingEnvironment这个里面有一些参数,比如我们当前应用程序的名称、目录的。

任务25:IHostEnvironment和 IApplicationLifetime介绍

 

 

任务25:IHostEnvironment和 IApplicationLifetime介绍

 

 await context.Response.WriteAsync($"ContentRootPath = {env.ContentRootPath}");
                await context.Response.WriteAsync($" EnvironmentName = {env.EnvironmentName}");
                await context.Response.WriteAsync($" WebRootPath = {env.WebRootPath}");
代码

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-02-03
  • 2022-01-08
  • 2021-08-11
猜你喜欢
  • 2022-12-23
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2021-09-12
相关资源
相似解决方案