1腰鬼、Session has not been configured for this application or request
NETCore 使用Session 存儲(chǔ):
Startup.cs 如下配置
ConfigureServices: services.AddSession(); services.AddHttpContextAccessor();
Configure : app.UseSession();
2、Ajax 異步請(qǐng)求報(bào) 400 錯(cuò)誤
services.AddMvc()
.AddRazorPagesOptions(options =>
{
options.Conventions.ConfigureFilter(new IgnoreAntiforgeryTokenAttribute());
})
.SetCompatibilityVersion(CompatibilityVersion.Latest);