SessionStateSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
웹 애플리케이션에 대한 세션 상태를 구성합니다.
public ref class SessionStateSection sealed : System::Configuration::ConfigurationSection
public sealed class SessionStateSection : System.Configuration.ConfigurationSection
type SessionStateSection = class
inherit ConfigurationSection
Public NotInheritable Class SessionStateSection
Inherits ConfigurationSection
- 상속
예제
이 섹션에서는 두 가지 코드 예제를 제공합니다. 첫 번째는 클래스의 sessionState 멤버로 액세스할 수도 있는 섹션의 여러 특성에 SessionStateSection 대해 선언적으로 값을 지정하는 방법을 보여 줍니다. 두 번째는 클래스를 사용하는 방법을 보여 줍니다 SessionStateSection .
다음 구성 파일 예제에서는 섹션에 대해 선언적으로 값을 지정하는 방법을 보여 있습니다 sessionState .
<configuration>
<system.web>
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;
Integrated Security=SSPI"
sqlCommandTimeout="30"
customProvider=""
cookieless="UseDeviceProfile"
cookieName="ASP.NET_SessionId"
timeout="20"
allowCustomSqlDatabase="False"
regenerateExpiredSessionId="False"
partitionResolverType=""
useHostingIdentity="True">
<providers>
<clear />
</providers>
</sessionState>
</system.web>
</configuration>
다음 코드 예제에서는 클래스를 사용 하는 방법을 보여 줍니다 SessionStateSection .
// Get the Web application configuration object.
System.Configuration.Configuration configuration =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the section related object.
System.Web.Configuration.SessionStateSection sessionStateSection =
(System.Web.Configuration.SessionStateSection)
configuration.GetSection("system.web/sessionState");
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/aspnetTest")
' Get the section.
Dim sessionStateSection As System.Web.Configuration.SessionStateSection = _
CType(configuration.GetSection("system.web/sessionState"), _
System.Web.Configuration.SessionStateSection)
설명
클래스는 SessionStateSection 태그로 식별된 Machine.config 또는 Web.config 구성 파일의 sessionState 요소를 참조합니다.
새 클라이언트가 웹 애플리케이션과 상호 작용을 시작하면 세션 ID가 발급되고 세션이 유효한 시간 동안 동일한 클라이언트의 모든 후속 요청과 연결됩니다. 이 ID는 요청 간에 클라이언트 세션과 연결된 서버 쪽 상태를 유지하는 데 사용됩니다. SessionStateSection ASP.NET 애플리케이션이 각 클라이언트를 대신하여 이 연결을 설정하고 유지 관리하는 방법을 제어합니다.
이 메커니즘은 매우 유연하며, 세션 상태 정보를 처리되지 않고 호스트하고 쿠키를 사용하지 않고 상태를 추적할 수 있는 기능을 제공합니다.
생성자
| Name | Description |
|---|---|
| SessionStateSection() |
SessionStateSection 클래스의 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| AllowCustomSqlDatabase |
사용자가 속성에서 초기 카탈로그 값을 지정할 수 있는지 여부를 나타내는 값을 SqlConnectionString 가져오거나 설정합니다. |
| CompressionEnabled |
세션 상태 데이터에 대해 압축을 사용할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다. |
| Cookieless |
쿠키가 클라이언트 세션을 식별하는 데 사용되는지 여부를 나타내는 값을 가져오거나 설정합니다. |
| CookieName |
쿠키 이름을 가져오거나 설정합니다. |
| CookieSameSite |
쿠키의 SameSite 특성 값을 가져오거나 설정합니다. |
| CurrentConfiguration |
현재 Configuration 인스턴스가 속한 구성 계층 구조를 나타내는 최상위 ConfigurationElement 인스턴스에 대한 참조를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| CustomProvider |
컬렉션에서 Providers 사용자 지정 공급자의 이름을 가져오거나 설정합니다. |
| ElementInformation |
사용자 지정할 수 없는 정보와 ElementInformation 개체의 기능이 포함된 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| ElementProperty |
ConfigurationElementProperty 개체 자체를 나타내는 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| EvaluationContext |
ContextInformation 개체에 대한 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| HasContext |
CurrentConfiguration 속성이 |
| Item[ConfigurationProperty] |
이 구성 요소의 속성 또는 특성을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Item[String] |
이 구성 요소의 속성, 특성 또는 자식 요소를 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| LockAllAttributesExcept |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockAllElementsExcept |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockAttributes |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockElements |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockItem |
요소가 잠겨 있는지 여부를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Mode |
세션 상태를 저장할 위치를 지정하는 값을 가져오거나 설정합니다. |
| PartitionResolverType |
세션 상태를 저장할 위치를 지정하는 값을 가져오거나 설정합니다. |
| Properties |
속성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| Providers |
현재 ProviderSettingsCollection 공급자를 가져옵니다. |
| RegenerateExpiredSessionId |
클라이언트에서 만료된 세션 ID를 지정할 때 세션 ID를 다시 발급할지 여부를 나타내는 값을 가져오거나 설정합니다. |
| SectionInformation |
개체의 SectionInformation 사용자 지정할 수 없는 정보 및 기능을 포함하는 개체를 ConfigurationSection 가져옵니다. (다음에서 상속됨 ConfigurationSection) |
| SessionIDManagerType |
정규화된 세션 ID 관리자 유형을 지정하는 값을 가져오거나 설정합니다. |
| SqlCommandTimeout |
SQL Server 세션 상태 모드를 사용하여 SQL 명령에 대한 기간 제한 시간을 가져오거나 설정합니다. |
| SqlConnectionRetryInterval |
ASP.NET 데이터베이스에 다시 연결하기 전에 경과해야 하는 시간 간격을 가져오거나 설정합니다. |
| SqlConnectionString |
SQL 연결 문자열을 가져오거나 설정합니다. |
| StateConnectionString |
상태 서버 연결 문자열을 가져오거나 설정합니다. |
| StateNetworkTimeout |
웹 서버와 상태 서버 간의 네트워크 연결이 유휴 상태로 유지될 수 있는 시간을 가져오거나 설정합니다. |
| Timeout |
세션 제한 시간을 가져오거나 설정합니다. |
| UseHostingIdentity |
세션 상태가 사용 가능한 경우 클라이언트 가장을 사용할지 또는 항상 호스팅 ID로 되돌릴지를 지정하는 값을 가져오거나 설정합니다. |