ComContractElement.RequiresSession Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a Boolean value that specifies whether the contract can only be used on sessionful bindings.

Namespace:   System.ServiceModel.Configuration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

[ConfigurationPropertyAttribute("requiresSession", DefaultValue = true)]
public bool RequiresSession { get; set; }

Property Value

Type: System.Boolean

true if the contract can only be used on sessionful bindings; otherwise, false. The default is false.

When the service is initialized, the integration runtime ensures that this setting is consistent with the type of binding to be used. An exception is generated if one or more of the bindings for the contract are in conflict. If this property is false, a one-way channel is in use and there are any [out] parameters, an exception is also generated.

.NET Framework
Available since 3.0
Return to top
Show: