玄铁剑

成功的途径:抄,创造,研究,发明...
posts - 128, comments - 42, trackbacks - 0, articles - 174

用Sqlserver配置StateServer

Posted on 2007-04-21 18:36 玄铁剑 阅读(372) 评论(0)  编辑 收藏 引用 所属分类: ASP.NET相关

配置Sqlserver作為SessionState服務器,Open DB:

EXECUTE sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO

EXECUTE sp_configure 'Agent XPs', 1
RECONFIGURE WITH OVERRIDE
GO

EXECUTE sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO

C:\Visual Studio 8\SDK\v2.0>aspnet_regsql -S dbserver -U userid -P password
sstype c -d database -ssadd

<sessionState
  mode="SQLServer"
  allowCustomSqlDatabase="true"
  sqlConnectionString="data source=dbserver;uid=database ;pwd=userid ;
                       database=password;pooling=true;"
  sqlCommandTimeout="30"
  cookieless="false"
  timeout="20"
/>

只有注册用户登录后才能发表评论。