Windows apps
Collapse the table of content
Expand the table of content
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.

MsmqBindingElementBase::ValidityDuration Property

.NET Framework (current version)
 

Gets or sets a value that specifies the duration a message will be locked by the receive context feature.

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

public:
property TimeSpan ValidityDuration {
	TimeSpan get();
	void set(TimeSpan value);
}

Property Value

Type: System::TimeSpan

The duration a message will be locked by the receive context feature.

Exception Condition
ArgumentOutOfRangeException

The value is less than zero or is larger than Int32.MaxValue.

The default value is 5 minutes. Receive context locks the message for inspection until it is either consumed or released back onto the queue. The validity duration property specifies how long the message will remain locked by receive context before it is automatically released back onto the queue.

System_CAPS_importantImportant

If ValidityDuration expires for a message, any transaction that may be used for its processing will be aborted along with the workflow instance if the expiration occurs during the transaction.

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft