LocalClientSecuritySettings 클래스

정의

로컬 클라이언트 보안 설정을 지정합니다.

public ref class LocalClientSecuritySettings sealed
public sealed class LocalClientSecuritySettings
type LocalClientSecuritySettings = class
Public NotInheritable Class LocalClientSecuritySettings
상속
LocalClientSecuritySettings

예제

이 예제에서는 클래스를 사용하는 LocalClientSecuritySettings 방법을 보여줍니다.

// Create an instance of the binding to use.
WSHttpBinding b = new WSHttpBinding();

// Get the binding element collection.
BindingElementCollection bec = b.CreateBindingElements();

// Find the SymmetricSecurityBindingElement in the collection.
// Important: Cast to the SymmetricSecurityBindingElement when using the Find
// method.
SymmetricSecurityBindingElement sbe = (SymmetricSecurityBindingElement)
    bec.Find<SecurityBindingElement>();

// Get the LocalSecuritySettings from the binding element.
LocalClientSecuritySettings lc = sbe.LocalClientSettings;

// Print out values.
Console.WriteLine("Maximum cookie caching time: {0} days", lc.MaxCookieCachingTime.Days);
Console.WriteLine("Replay Cache Size: {0}", lc.ReplayCacheSize);
Console.WriteLine("ReplayWindow: {0} minutes", lc.ReplayWindow.Minutes);
Console.WriteLine("MaxClockSkew: {0} minutes", lc.MaxClockSkew.Minutes);
Console.ReadLine();

// Change the MaxClockSkew to 3 minutes.
lc.MaxClockSkew = new TimeSpan(0, 0, 3, 0);

// Print the new value.
Console.WriteLine("New MaxClockSkew: {0} minutes", lc.MaxClockSkew.Minutes);
Console.ReadLine();

// Create an EndpointAddress for the service.
EndpointAddress ea = new EndpointAddress("http://localhost/calculator");

// Create a client. The binding has the changed MaxClockSkew.
// CalculatorClient cc = new CalculatorClient(b, ea);
// Use the new client. (Not shown.)
// cc.Close();
' Create an instance of the binding to use.
Dim b As New WSHttpBinding()

' Get the binding element collection.
Dim bec As BindingElementCollection = b.CreateBindingElements()

' Find the SymmetricSecurityBindingElement in the collection.
' Important: Cast to the SymmetricSecurityBindingElement when using the Find
' method.
Dim sbe As SymmetricSecurityBindingElement = CType(bec.Find(Of SecurityBindingElement)(), SymmetricSecurityBindingElement)

' Get the LocalSecuritySettings from the binding element.
Dim lc As LocalClientSecuritySettings = sbe.LocalClientSettings

' Print out values.
Console.WriteLine("Maximum cookie caching time: {0} days", lc.MaxCookieCachingTime.Days)
Console.WriteLine("Replay Cache Size: {0}", lc.ReplayCacheSize)
Console.WriteLine("ReplayWindow: {0} minutes", lc.ReplayWindow.Minutes)
Console.WriteLine("MaxClockSkew: {0} minutes", lc.MaxClockSkew.Minutes)
Console.ReadLine()

' Change the MaxClockSkew to 3 minutes.
lc.MaxClockSkew = New TimeSpan(0, 0, 3, 0)

' Print the new value.
Console.WriteLine("New MaxClockSkew: {0} minutes", lc.MaxClockSkew.Minutes)
Console.ReadLine()

' Create an EndpointAddress for the service.
Dim ea As New EndpointAddress("http://localhost/calculator")

' Create a client. The binding has the changed MaxClockSkew.
' CalculatorClient cc = new CalculatorClient(b, ea);
' Use the new client. (Not shown.)
' cc.Close();

설명

이 클래스에는 보안 채널을 빌드하기 위해 (및 클래스에서 파생된) 에서 사용하는 SecurityBindingElement 로컬 보안 설정이 포함되어 있습니다. 이러한 설정은 클라이언트에 로컬이며 서비스의 보안 정책에서 결정되지 않습니다.

생성자

LocalClientSecuritySettings()

LocalClientSecuritySettings 클래스의 새 인스턴스를 초기화합니다.

속성

CacheCookies

보안 대화 쿠키가 캐시되는지 여부를 나타내는 값을 가져오거나 설정합니다.

CookieRenewalThresholdPercentage

보안 대화 쿠키 갱신의 임계값 백분율을 가져오거나 설정합니다.

DetectReplays

클라이언트가 서비스에서 수신하는 메시지에 재생 검색이 사용되는지 여부를 나타내는 값을 가져오거나 설정합니다.

IdentityVerifier

ID 검증 도구를 가져오거나 설정합니다.

MaxClockSkew

서로 통신하는 양쪽 시스템 클록 간에 허용되는 최대 시간 차이를 가져오거나 설정합니다.

MaxCookieCachingTime

보안 대화 쿠키에 대한 최대 캐싱 시간을 가져오거나 설정됩니다.

NonceCache

로컬 클라이언트 보안 설정에 대한 캐시를 가져오거나 설정합니다.

ReconnectTransportOnFailure

보안 세션에서 전송 실패 후 다시 연결을 시도하는지 여부를 나타내는 값을 가져오거나 설정합니다.

ReplayCacheSize

재생 검색에 사용되는 캐시된 Nonce 수를 가져오거나 설정합니다.

ReplayWindow

메시지 Nonce가 유효성을 유지하는 최대 시간을 가져오거나 설정합니다.

SessionKeyRenewalInterval

해당 기간이 경과하면 초기자가 보안 세션에 대한 키를 갱신해야 하는 시간 범위를 가져오거나 설정합니다.

SessionKeyRolloverInterval

키 갱신 중 들어오는 메시지에 대해 이전의 세션 키가 유효성을 유지하는 시간 간격을 가져오거나 설정합니다.

TimestampValidityDuration

클라이언트에서 메시지를 보낼 때 메시지가 유효성을 유지하는 최대 기간을 가져오거나 설정합니다. 이 기간 후에 서비스에서 메시지를 받으면 서비스에서 메시지를 삭제합니다.

메서드

Clone()

현재 인스턴스의 복사본 또는 복제본인 이 클래스의 새 인스턴스를 만듭니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보