Changing to SQL server for ASP.net session manangment -


i have asp.net web site uses "inproc" session manangment. now, looking @ option store sessions in sql server. looked @ online articles have use "installsqlstate.sql or installpersistsqlstate.sql" create session database on sql server. here questions.

  1. do have use script or can create database manually (using sql management studio create one) , make sure update exact database information on web.config
  2. currently, saving session sesssion.contents["..."], how affect if change sql server session managment?
  3. is using sql going make site running slow?

thanks.

i recommend using aspnet_regsql.exe utility (part of .net framework) create necessary databases , tables. can run remote machine well, not necessary sql server. example:

aspnet_regsql.exe -s somesqlserver -e -ssadd -sstype p 

once aspstate database created on target sql server modify web.config file specify want use sql server sessions:

<sessionstate      mode="sqlserver"     sqlconnectionstring="data source=somesqlserver;initial catalog=aspsate;user id=asp;password=secret;"  /> 

you might need create user authorized access database. no changes necessary code.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -