解决方案

在Startup中添加下面语句:

public void ConfigureServices(IServiceCollection services)
{
    // Add CookieTempDataProvider after AddMvc and include ViewFeatures.
    // using Microsoft.AspNetCore.Mvc.ViewFeatures;
    services.AddSingleton<ITempDataProvider, CookieTempDataProvider>();
}

相关链接

  1. Microsoft
  2. DotnetCurry

相关文章:

  • 2021-09-02
  • 2021-09-27
  • 2021-04-18
  • 2022-12-23
  • 2021-04-29
  • 2021-08-21
  • 2022-12-23
  • 2021-12-14
猜你喜欢
  • 2021-07-18
  • 2021-09-06
  • 2021-12-30
  • 2021-05-09
  • 2021-08-06
  • 2022-12-23
相关资源
相似解决方案