Using Session State with SQL Server

SQL Server Session State in ASP.NET 2.0
The Following Command is used to install Sql Server Session state for ASP.NET 2.0
c:\Program Files\Microsoft Visual Studio 8\VC>aspnet_regsql.exe -C "Data Source=PC8\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True" -ssadd -sstype c
Start adding session state.
..........
Finished.
To use this custom session state database in your web application, please specify it in the configuration file by using the 'allowCustomSqlDatabase' and 'sqlConnectionString' attributes in the \ section.
c:\Program Files\Microsoft Visual Studio 8\VC>

The Following statement is needed to add in WEb.config File

< system.web >
< sessionstate allowcustomsqldatabase="true" timeout="20" mode="SQLServer" cookieless="false" sqlconnectionstring="Data Source=PC8\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True" > < /sessionstate >
< /SYSTEM.WEB >

Comments

Yograj said…
Hi Sir,

This Link is very good, where i can see new feachers in VS2010.

Thanks a lot sir.

Best Regards
Yograj Pandey

Popular posts from this blog

To Move items from one ListBox to another Listbox

Receive Json Web response in C#