ASP.NET Session StateServer
Out-of-process Mode
Included with the .NET SDK is a Windows® NT service: ASPState. This Windows service is what ASP.NET uses for out-of-process session state management. To use this state manager, you first need to start the service. To start the service, open a command prompt and type:
net start aspstate
What you'll see is:
Figure 1. Starting the Windows NT service ASPState at the command prompt
At this point, the Windows NT Service ASPState has started and is available to ASP.NET. Next, we need to configure ASP.NET to take advantage of this service. To do this we need to configure config.web:
<configuration> <sessionstate mode="stateserver" cookieless="false" timeout="20" sqlconnectionstring="data source=127.0.0.1;user id=<user id>;password=<password>" server="127.0.0.1" port="42424" /> </configuration>
We changed only from inproc
mode to stateserver mode
. This setting tells ASP.NET to look for the ASP state service on the server specified in the server
and port
settings—in this case, the local server.
We can now call SessionState.aspx, set a session state value, stop and start the IIS process (iisreset), and continue to have access to the values for our current state.
댓글
이 글 공유하기
다른 글
-
Gmail SMTP를 이용한 Mail 전송 ASP.NET 웹 프로그램
Gmail SMTP를 이용한 Mail 전송 ASP.NET 웹 프로그램
2007.05.27 -
FarPoint Spread를 이용한 ActiveX 페이지와 스크립트 제어
FarPoint Spread를 이용한 ActiveX 페이지와 스크립트 제어
2007.05.23 -
ASP.NET 페이지 캐쉬를 사용하지 않도록...
ASP.NET 페이지 캐쉬를 사용하지 않도록...
2007.05.18 -
간단하게 만들었던 업로드 하는 컨트롤
간단하게 만들었던 업로드 하는 컨트롤
2007.05.16