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.
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.
Read my blog | Twitter Working with Azure, chatbots, ASP.NET MVC, Web API, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Member
13 Points
32 Posts
Sessions ASP.net
Sep 22, 2017 05:58 AM|adityaraj|LINK
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?
All-Star
191741 Points
20952 Posts
ASPInsiders
Moderator
MVP
Re: Sessions ASP.net
Sep 22, 2017 08:40 AM|XIII|LINK
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.
Working with Azure, chatbots, ASP.NET MVC, Web API, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Member
13 Points
32 Posts
Re: Sessions ASP.net
Sep 24, 2017 11:43 PM|adityaraj|LINK
Thanks for the reply.Will check the options which you have suggested using cache.