MuruganAD.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  DISCUSSION FORUM   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



ASP .NET How to store Session value in a Database as session data is lost in webfarms

Home    ASP .NET    ASP .NET WebFarm Session in Database

ASP .NET How to store Session value in a Database as session data is lost in webfarms

Create a custom database 
D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -ssadd -sstype c
 -d leedhar_session -U sa -P sa123 -S MURUGAN\SQLEXPRESS

Start adding session state.

.........................

Finished.

To use this custom session state database in your web application, please specif
y it in the configuration file by using the 'allowCustomSqlDatabase' and 'sqlCon
nectionString' attributes in the \ section.




Add this to web.config 

      sessionState allowCustomSqlDatabase="true" 
sqlConnectionString="data source=MURUGAN\SQLEXPRESS;initial catalog=leedhar_session;
user id=sa;password=sa123" timeout="30" mode="SQLServer" cookieless="AutoDetect" 







  |  HOME   |  BLOG   |  DISCUSSION FORUM   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam