????????????????Session??α?????sql??????е?????????????????????
????asp.net?У?session?????inproc???洢??????????iis?????У??????и??????Ч????????????????????????????????session?????????SQL Server?У????????????????inproc????????10%-20%?????????????????????????
????1???????SQL Server?е????????
????ASP.NET SQL Server ???????Aspnet_regsql.exe??????????? ASP.NET ?е? SQL Server ?????????? Microsoft SQL Server ?????Aspnet_regsql.exeλ?? /%windir%/Microsoft.NET/Framework/<versionNumber>/aspnet_regsql.exe ?????????鷳?????? ?????visual studio tools ??????????????????????aspnet_regsql.exe??á??÷????£?
????Aspnet_regsql.exe <options>
?????????????μ???????????session?????ASPState
????aspnet_regsql.exe -S localhost -U sa -P why1234? -ssadd -sstype p
????-S??-U/-P
???????????д???????????????????????????????
????-ssadd / –ssremove ????:
????-ssadd????????Session????? -ssremove??????Session?????.
????sstype ????:
???????
???????
????t
????????????洢?? SQL Server tempdb ??????С???????????á????????????洢?? tempdb ??????У???????????? SQL Server ?????????????
????p
????????????洢?? ASPState ??????У???????洢?? tempdb ??????С?
????c
????????????洢?????????????С???????c????????????-d??????????????????????
??????????????????myAppState???????????μ?????
????aspnet_regsql.exe -S localhost -U sa -P why1234? -ssadd -sstype c -d myAppState
????2??????webconfig
??????webconfig?? <system.web>????????????????
????<sessionState mode="SQLServer" sqlConnectionString="server=localhost; uid=sa; pwd=123456;"/>
????????????????????????????????????????????????????μ???????
????<sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="server=localhost; DataBase=myAspState;uid=sa; pwd=123456;"/>
???????????????????????????????????????????msdn??