其他分享
首页 > 其他分享> > .NetCore Session

.NetCore Session

作者:互联网

public void ConfigureServices(IServiceCollection services)
		{
			services.AddSession(options =>
			{
				options.IdleTimeout = TimeSpan.FromMinutes(60);
			}
		   );
			services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
			services.AddControllersWithViews();
		}

标签:AddSingleton,ConfigureServices,NetCore,FromMinutes,Session,services,options
来源: https://www.cnblogs.com/Vincent01/p/15010656.html