如题:在数据库存储SESSION的使用方法是怎样的?
比如说我要跟以前一样保存dataset或者datatable应该会怎么做呢?
还是跟以前一样操作呢?

解决方案 »

  1.   

    aspnet_regsql.exe -ssadd -sstype c -d [DB]  -S [Server] –E
    E是使用Windows认证,也可以使用数据库认证:
    aspnet_regsql.exe -ssadd -sstype c -d [DB]  -S [Server] –U [User Name] – P [Password]web.config:
    <sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=[Server];initial catalog=[DB];user id=[User Name];password=[Password]"
    cookieless="false" timeout="20" />
    session 配置
      

  2.   

    <sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="server=.;database=MyBookShop;uid=sa;pwd=renfeng"cookieless="false" timeout="20" />