locked
Sessions ASP.net RRS feed

  • Question

  • User191488190 posted

    HI,

    We have used sessions  in .net web application to store data sources for Grid.

    Users are permitted to open any number of application sessions as they can. 

    Now, when users using 2 sessions simultaneously then the session in one browser window overlapping with other.

    Initially we have used Viewstate but because the viewstate is growing up more and more and chrome is no more supporting the size of the viewstate , we switched to sessions.

    Is there a  way to handle this issue?

    Friday, September 22, 2017 5:58 AM

Answers

  • User541108374 posted

    Hi,

    putting grid data in session is also not the best option to go for.

    But it seems you're encountering something different: a clash of what needs to be 2 sessions but the user gets 1 because he's using the same browser but with different tabs?

    An alternative is to load the data from the database each time but that might hit hard on your db when having many users. Another solution would be to have users read from a cached version of your database, like Redis cache, and keep that in sync with your database in a CQRS way.

    Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 22, 2017 8:40 AM

All replies

  • User541108374 posted

    Hi,

    putting grid data in session is also not the best option to go for.

    But it seems you're encountering something different: a clash of what needs to be 2 sessions but the user gets 1 because he's using the same browser but with different tabs?

    An alternative is to load the data from the database each time but that might hit hard on your db when having many users. Another solution would be to have users read from a cached version of your database, like Redis cache, and keep that in sync with your database in a CQRS way.

    Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 22, 2017 8:40 AM
  • User191488190 posted

    Thanks for the reply.Will check the options which you have suggested using cache.

    Sunday, September 24, 2017 11:43 PM