← Tutti gli articoli

ASP.NET SQL Server Custom Session State Database Registration

10 December 2010  ·  Asp.Net · Article  ·  92 visite

Custom Asp.Net sessionState database in SQLServer

Find aspnet_regsql.exe in the following dirs:


cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
o
C:\Windows\Microsoft.NET\Framework\v2.0.50727

Run


aspnet_regsql.exe -S SqlServerDatabase -E -ssadd -sstype c -d CustomDatabasenameState

-S Sql Server Database

-d  Custom DatabaseName

-sstype c Custom Database


Sql Server connection

a) -E  Windows Authentication

b) -u username -p password


In the Web.Config

 --
<system.web>
 
<sessionState mode="SQLServer" sqlConnectionString="Data Source=CustomDatabasenameState ;
Initial Catalog=ContraDevState;
user id= sqlserverusername;
password=sqlserverpassword;
Application Name= ApplicationName"
cookieless="false"
timeout="20"
allowCustomSqlDatabase="true" />
<!--  .................... -->
</system.web> --
Si è verificato un errore imprevisto. Ricarica

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.