RequireCancellation Property

SecureConversationSecurityTokenParameters.RequireCancellation Property

Gets or sets a value that indicates whether cancellation is required.

Namespace: System.ServiceModel.Security.Tokens
Assembly: System.ServiceModel (in system.servicemodel.dll)

public bool RequireCancellation { get; set; }
/** @property */
public boolean get_RequireCancellation ()

/** @property */
public void set_RequireCancellation (boolean value)

public function get RequireCancellation () : boolean

public function set RequireCancellation (value : boolean)

Not applicable.

Property Value

true if cancellation is required; otherwise, false. The default is true.

When Windows authentication is used in combination with a stateful security context token, WCF does not populate the WindowsIdentity property with the actual caller's identity, but instead sets the property to anonymous. Because WCF security must re-create the content of the service security context for every request from the incoming security context token, the server does not keep track of the security session in the memory. Because it is impossible to serialize the WindowsIdentity instance into the security context token, the WindowsIdentity property returns an anonymous identity.

The following configuration exhibits this behavior.

  <binding name="Cancellation">
       <textMessageEncoding />
                 requireSecurityContextCancellation="true" />
    <httpTransport />

For more information about stateful security context tokens, see How To: Create a Stateful Security Context Token for a Secure Session.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2016 Microsoft