can anyone please provide me code on how to add sessions
Loading
can anyone please provide me code on how to add sessions
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek YadavPosted Oct 20, 2022, 1:53 AM
public class Startup { public void Configure(IApplicationBuilder app){ app.UseSession(); app.UseMvc(); app.Run(context => { return context.Response.WriteAsync("Hello World!"); }); } public void ConfigureServices(IServiceCollection services){ services.AddMvc(); services.AddSession(options => { options.IdleTimeout = TimeSpan.FromMinutes(60); }); } }Naresh BeniwalPosted Oct 30, 2022, 4:56 PM
https://www.c-sharpcorner.com/UploadFile/225740/introduction-of-session-in-Asp-Net/
Rajanikant HawaldarPosted Oct 20, 2022, 10:37 AM
https://www.c-sharpcorner.com/article/how-to-use-session-in-asp-net-core