Difference between Asp.NET Profile Properties and Session State Properties?

First of all, there are a lot of similarities between both of them as both monitor a specific user’s action on your site on server side and every user has his different session state and Profiles. The biggest difference is that Session state is lost when user end his session by Closing the browser which means that sessions are non-persistent. Profiles as being the persistent object, handle this for us by automatically saving the user profile in Microsoft SQL Server Express database located in App_Data of your web application. Profiles are saved in backend so there is no chance of losing them when user closes the browser window. The other difference is that Properties are strongly typed which means we can use them with the help of intellisense using new versions of Visual Studio while sessions are a mere collection of different objects. If you want to further explore the Profile Properties in Asp.net, I strongly recommend you to read the MSDN documentation on this topic.

Cheers and happy coding

Leave a Reply

Your email address will not be published. Required fields are marked *