I'm developing e-commerce system asp.net core mvc, I use session but I think this is a bad method. For example if user not make action session boom. I want to generate token and use.
its hard to imagine an e-commerce system that doesn't use session. though for many (like amazon) its common to uses non-expiring sessions, although authorization expires.
asp.net core session are just a token in a cookie. Core fixed the performance issues with the old session manager.
Things are not bad or good. You have to understand them. Always favor what comes out of the box. ASP..NET does have an extensive system to manage authentication/authorization/users out of the box.
To get back at session variables, I try to use them only for small, never changing, often used information I can reload on demand. This way the app is not sensitive to a missing session variable. It will just reload the value as needed (and it doesn't apply
to knowing if a user is logged or not which is why you have this problem).
None
0 Points
3 Posts
ASP.NET Core MVC Session Alternative ?
Oct 03, 2019 02:51 PM|ob7|LINK
I'm developing e-commerce system asp.net core mvc, I use session but I think this is a bad method. For example if user not make action session boom. I want to generate token and use.
Does that make sense ? What is your suggestions ?
All-Star
194490 Points
28079 Posts
Moderator
Re: ASP.NET Core MVC Session Alternative ?
Oct 03, 2019 03:06 PM|Mikesdotnetting|LINK
What are you using session for?
None
0 Points
3 Posts
Re: ASP.NET Core MVC Session Alternative ?
Oct 03, 2019 03:10 PM|ob7|LINK
Login to e-commorce with username,password from database
All-Star
58194 Points
15658 Posts
Re: ASP.NET Core MVC Session Alternative ?
Oct 03, 2019 03:12 PM|bruce (sqlwork.com)|LINK
its hard to imagine an e-commerce system that doesn't use session. though for many (like amazon) its common to uses non-expiring sessions, although authorization expires.
asp.net core session are just a token in a cookie. Core fixed the performance issues with the old session manager.
All-Star
194490 Points
28079 Posts
Moderator
Re: ASP.NET Core MVC Session Alternative ?
Oct 03, 2019 03:19 PM|Mikesdotnetting|LINK
All-Star
48520 Points
18073 Posts
Re: ASP.NET Core MVC Session Alternative ?
Oct 03, 2019 05:17 PM|PatriceSc|LINK
Hi,
Things are not bad or good. You have to understand them. Always favor what comes out of the box. ASP..NET does have an extensive system to manage authentication/authorization/users out of the box.
To get back at session variables, I try to use them only for small, never changing, often used information I can reload on demand. This way the app is not sensitive to a missing session variable. It will just reload the value as needed (and it doesn't apply to knowing if a user is logged or not which is why you have this problem).