ASP.NET session caches per user session state. It basically uses “HttpSessionState” class.
Following are the limitations in classic ASP sessions :-
- ASP session state is dependent on IIS process very heavily. So if IIS restarts ASP session variables are also recycled.ASP.NET session can be independent of the hosting environment thus ASP.NET session can maintained even if IIS reboots.
- ASP session state has no inherent solution to work with Web Farms.ASP.NET session can be stored in state server and SQL SERVER which can support multiple server.
- ASP session only functions when browser supports cookies.ASP.NET session can be used with browser side cookies or independent of it.
Other than session variables you can use the following technique to store state :
- Hidden fields
- View state
- Hidden frames
- Cookies
- Query strings