gpt4 book ai didi

sql 中的 ASP.NET session 状态

转载 作者:搜寻专家 更新时间:2023-10-30 22:17:44 25 4
gpt4 key购买 nike

我们用sql server来存储asp.net的session,我看ASPState数据库中的ASPStateTempSessions表是空的,请问是不是session过期了这个表的记录就被删除了?那里的记录什么时候会被删除?

最佳答案

The InstallSqlState.sql script creates a job called ASPState_Job_DeleteExpiredSessions to delete expired sessions from tempdb. Recall that ASP.NET does not keep session resources alive indefinitely. To support this feature when a SQL Server is used to maintain state, the SQL Server Agent must be running so that the expired session deletion job runs as needed. By default, the job is scheduled to run every minute. It deletes session state rows with an Expires value less than the current time. The account under which the SQL Server Agent runs must have the privilege to execute the DeleteExpiredSessions stored procedure.

请引用this one

关于sql 中的 ASP.NET session 状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9223898/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com