ComContractElement::RequiresSession Property

 

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)

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

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: