Base solution for your next web application
Open Closed

Backend Session timeout on Asp.net core #11541


User avatar
0
amasanad created

Hello i need to add session time out for asp.net backend i've been trying with the follwoing on startup

services.ConfigureApplicationCookie(o => { o.ExpireTimeSpan = TimeSpan.FromSeconds(15); o.SlidingExpiration = true; });

AND

services.AddSession(options => { options.IdleTimeout = TimeSpan.FromSeconds(10); });

but it's not working can you please help using asp.net core with angular


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    AspNet Zero has such a feature. If you go to settings page, you can find it under User Management tab, see https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Features-Angular-Host-Settings#user-management

  • User Avatar
    0
    amasanad created

    Hi i know this feature howecer this would only be valid from front end or while i'm using the angualr app but the issue came out as vulnerabilities, as the security team are testing the apis with different tools like Burp suite

    please advise, how to do it from backend server side

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    When you are using Angular app, server side app doesn't use any session or cookies. Are you talking about server side login operation via Ui/Login page ?