I just finished watching Stefan Schackow's PDC 2009 session and he mentioned that he is surprised that people are still using Session State in ASP.NET. Session State is even used internally in ASP.NET MVC.
Having worked with a legacy application where everything is put into a "in-proc" session (even datatables!), I've seen session abuse first-hand.
Is there a way to build an ASP.NET application without session state? How would you store information for each step of a typical e-commerce workflow?
You've got the following options: cookies, database, querystring, page variables, and server cache to try to handle the stateless nature of the web. Each has its own tradeoff, but pragmatically speaking I currently use session that gets stored in the db. This scales well for server farms, helps to keep your pagesize small, and is easy to implement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With