locked
What is the advantage of saving user session in database RRS feed

  • Question

  • User264732274 posted

    anyone can tell me in what kind of situation people store user session data in database ?

    give me example of few scenario where it is required.

    thanks

    Thursday, July 21, 2016 11:29 AM

Answers

  • User-821857111 posted

    You would mainly store it in a database if your web application is being hosted in a web farm (i.e. across multiple servers). That's because a visitor might connect to different servers on each request, so there is no point in keeping session data in server memory (inproc) because that can't be shared across servers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 21, 2016 11:43 AM

All replies

  • User-821857111 posted

    You would mainly store it in a database if your web application is being hosted in a web farm (i.e. across multiple servers). That's because a visitor might connect to different servers on each request, so there is no point in keeping session data in server memory (inproc) because that can't be shared across servers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 21, 2016 11:43 AM
  • User1997618745 posted

    Hi,

    When you have asp.net application with Web API as a Service layer, you may require to store the session specific user and role information in the SQL server.

    that Session Id is the commonly referred by the asp.net web application and asp.net Web API as well.

     

    Thanks

    Selva

    Tuesday, August 9, 2016 6:51 AM