HttpCookiesSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
웹 애플리케이션에 사용되는 쿠키의 속성을 구성합니다.
이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다.
public ref class HttpCookiesSection sealed : System::Configuration::ConfigurationSection
public sealed class HttpCookiesSection : System.Configuration.ConfigurationSection
type HttpCookiesSection = class
inherit ConfigurationSection
Public NotInheritable Class HttpCookiesSection
Inherits ConfigurationSection
- 상속
예제
다음 코드 예제에서는 가져오는 방법을 보여 줍니다는 HttpCookiesSection 기존 웹 애플리케이션의 구성 파일에서 개체입니다.
// Get the Web application configuration.
System.Configuration.Configuration webConfig =
WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the section.
string configPath = "system.web/httpCookies";
System.Web.Configuration.HttpCookiesSection httpCookiesSection =
(System.Web.Configuration.HttpCookiesSection)webConfig.GetSection(
configPath);
' Get the Web application configuration.
Dim webConfig _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration("/aspnetTest")
' Get the section.
Dim configPath As String _
= "system.web/httpCookies"
Dim httpCookiesSection _
As System.Web.Configuration.HttpCookiesSection = _
CType(webConfig.GetSection(configPath), _
System.Web.Configuration.HttpCookiesSection)
설명
HttpCookiesSection 클래스를 사용하면 구성 파일의 httpCookies
섹션을 프로그래밍 방식으로 액세스하고 수정할 수 있습니다.
쿠키를 발급 하는 코드를 재정의 하지 않는 한 애플리케이션에 발급 된 모든 쿠키에 기본적으로 적용 되는 설정을 정의 합니다.
한 가지 목표는 httpCookies
요소를 사용 하도록 지원 하려면 HttpOnly
쿠키입니다. HttpOnly
쿠키 (사용 하 여 쿠키를 HttpOnly
특성) 사이트 간 스크립팅의 위험을 완화 하는 데 Internet Explorer 6에서 도입 되었습니다. HttpOnly
특성 쿠키를 클라이언트 쪽 스크립트를 통해 액세스 하지 못하게 방지 합니다. 에 포함 된 모든 정보는 HttpOnly
쿠키는 해커가 악성 웹 사이트에 공개 될 가능성이 적습니다. 자세한 내용은 MSDN (msdn.microsoft.com) "HttpOnly."에 대 한 검색
참고
합니다 HttpCookiesSection 읽고에서 섹션 속성에 따라 구성 파일의 관련 섹션 정보를 쓸 수 있습니다 AllowDefinition 값인 Everywhere합니다.
생성자
HttpCookiesSection() |
이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다. HttpCookiesSection 클래스의 새 인스턴스를 초기화합니다. |
속성
CurrentConfiguration |
현재 Configuration 인스턴스가 속해 있는 구성 계층 구조를 나타내는 최상위 ConfigurationElement 인스턴스에 대한 참조를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
Domain |
이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다. 쿠키 도메인 이름을 가져오거나 설정합니다. |
ElementInformation |
ElementInformation 개체의 사용자 지정할 수 없는 정보와 기능을 포함하는 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
ElementProperty |
ConfigurationElementProperty 개체 자체를 나타내는 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
EvaluationContext |
ContextInformation 개체의 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
HasContext |
CurrentConfiguration 속성이 |
HttpOnlyCookies |
이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다. 브라우저의 |
Item[ConfigurationProperty] |
이 구성 요소의 속성이나 특성을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
Item[String] |
이 구성 요소의 속성, 특성 또는 자식 요소를 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
LockAllAttributesExcept |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
LockAllElementsExcept |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
LockAttributes |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
LockElements |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
LockItem |
요소가 잠겨 있는지 여부를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
Properties |
속성 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
RequireSSL |
이 API는 제품 인프라를 지원하며 코드에서 직접 사용되지 않습니다. SSL(Secure Sockets Layer) 통신이 필요한지 여부를 나타내는 값을 가져오거나 설정합니다. |
SameSite |
쿠키의 SameSite 특성에 대한 값을 가져오거나 설정합니다. |
SectionInformation |
사용자가 지정할 수 없는 SectionInformation 개체의 정보와 기능을 포함하는 ConfigurationSection 개체를 가져옵니다. (다음에서 상속됨 ConfigurationSection) |