Should asp.net session state be stored in a database separate from application data?
I am using SQL Server for persisting session state in a asp.net web application.
Is there a best开发者_开发知识库 practice for the location of the session data? Should it be in the database along with the application data or in a separate 'Application Services Database' as Microsoft suggests by default.
The application services database would also house other provider data (ie. roles, membership, etc.)
Thanks.
The session data should be stored separately to the data, as it doesn't make sense in a backup/restore situation for example. If you need to revert to a previous version of the database, or restore an old version, it makes no sense to restore the session data at the time of the backup.
Also, you will probably have different maintenance plans for session data as opposed to application data.
精彩评论