ServiceProxy<TService>.ShouldRetry Method

Definition

Checks a message security exception to determine if a service call should be attempted again.

protected:
 Nullable<bool> ShouldRetry(System::ServiceModel::Security::MessageSecurityException ^ messageSecurityException, Nullable<bool> retry);
protected bool? ShouldRetry (System.ServiceModel.Security.MessageSecurityException messageSecurityException, bool? retry);
member this.ShouldRetry : System.ServiceModel.Security.MessageSecurityException * Nullable<bool> -> Nullable<bool>
Protected Function ShouldRetry (messageSecurityException As MessageSecurityException, retry As Nullable(Of Boolean)) As Nullable(Of Boolean)

Parameters

messageSecurityException
MessageSecurityException

The exception to check.

retry
Nullable<Boolean>

null if this is the first time the check is performed; otherwise, this is the second time and a retry should not be performed.

Returns

true if the service call should be tried again; otherwise, false or null.

Remarks

This particular type of exception occurs in Active Directory environments or sometimes when Internet Information Services (IIS) is reset.

Applies to