找到路径 C:WINDOWSMicrosoft.NETFrameworkv2.0.50727 不同版本找不同版本的路径
在命令行执行命令
aspnet_regsql.exe -ssadd -sstype p -U sa
输入密码后即可创建aspstate数据库,并且可以保存session状态。
完成后有的时候会提示TEMPDB的权限或者其他错误。这个时候执行以下命令
use master go EXEC sp_configure 'Cross DB Ownership Chaining', '1' go RECONFIGURE go EXEC sp_dboption 'ASPState', 'db chaining', 'true' go