TsgcHTTPServer › 속성 › AutoStartSession

AutoStartSession 속성

세션 상태가 활성화된 경우 들어오는 모든 요청에 대해 자동으로 새 HTTP 세션을 생성합니다.

구문

property AutoStartSession: Boolean read GetAutoStartSession write SetAutoStartSession;

기본값

False

설명

SessionState와 AutoStartSession이 모두 True이면, HTTP 서버는 유효한 세션 쿠키가 없는 요청을 처음 볼 때 새 TIdHTTPSession을 할당하고(OnSessionStart를 발생시킴), 서버 코드에서 CreateSession()을 명시적으로 호출할 필요가 없습니다. 세션을 생성할지 요청을 거부할지를 핸들러 코드에서 직접 결정하려면 이 값을 False로 두십시오. SessionState가 False이면 이 속성은 아무런 효과가 없습니다.

예제


oServer := TsgcHTTPServer.Create(nil);
oServer.SessionState := true;
oServer.AutoStartSession := true;
oServer.SessionTimeOut := 600000;
oServer.Active := true;

속성으로 돌아가기