Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LocalClientSecuritySettings Class

Specifies local client security settings.

System.Object
  System.ServiceModel.Channels.LocalClientSecuritySettings

Namespace:  System.ServiceModel.Channels
Assemblies:   System.ServiceModel (in System.ServiceModel.dll)
  System.ServiceModel.Security (in System.ServiceModel.Security.dll)

public sealed class LocalClientSecuritySettings

The LocalClientSecuritySettings type exposes the following members.

  NameDescription
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsLocalClientSecuritySettingsInitializes a new instance of the LocalClientSecuritySettings class.
Top

  NameDescription
Public propertyCacheCookiesGets or sets a value that indicates whether secure conversation cookies are cached.
Public propertyCookieRenewalThresholdPercentageGets or sets the threshold percentage for renewal of secure conversation cookies.
Public propertyDetectReplaysGets or sets a value that indicates whether replay detection is enabled on messages the client receives from the service.
Public propertyIdentityVerifierGets or sets the identity verifier.
Public propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsMaxClockSkewGets or sets the maximum allowable time difference between the system clocks of the two parties that are communicating.
Public propertyMaxCookieCachingTimeGets or sets the maximum caching time for secure conversation cookies.
Public propertyNonceCacheGets or sets the cache for the local client security settings.
Public propertyReconnectTransportOnFailureGets or sets a value that indicates whether security sessions attempt to reconnect after transport failures.
Public propertyReplayCacheSizeGets or sets the number of cached nonces used for replay detection.
Public propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsReplayWindowGets or sets the maximum time that a message nonce is valid.
Public propertySessionKeyRenewalIntervalGets or sets the time span after which the initiator renews the key for the security session.
Public propertySessionKeyRolloverIntervalGets or sets the time interval for which the previous session key is valid on incoming messages during a key renewal.
Public propertySupported by Portable Class LibrarySupported in .NET for Windows Store appsTimestampValidityDurationGets or sets the maximum duration that the messages are valid when sent by the client. If a message is received by the service after this duration, it should discard the message.
Top

  NameDescription
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsCloneCreates a new instance of this class, which is a copy or clone of the current instance.
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySupported in .NET for Windows Store appsToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This class contains the local security settings used by the SecurityBindingElement (and classes derived from it) to build the security channel. These settings are local to the client and are not determined from the service's security policy.

This example shows how to use the LocalClientSecuritySettings class.

// 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();

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft