SessionAuthenticationModule.SignOutError Event

.NET Framework 4.5

Occurs when there is an error during sign-out.

Namespace:  System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public event EventHandler<ErrorEventArgs> SignOutError

Raised from the SignOut method when an error occurs during sign-out.

In an event handler, you can get the exception that resulted in the event being raised from the ErrorEventArgs.Exception property. You can cancel further processing of the exception, which has the result of not propagating the exception to the client, by setting the Cancel property of the ErrorEventArgs to true.

This event is not guaranteed to be called for every session. For example, the cookies may be deleted at the client-side, in which case, this event would never be raised because there is no server-side event for deleting the session.

The following code shows a handler for the SignOutError event implemented in the global.asax.cs file of an ASP.NET web application. You must also add the handler to the event. A more complete example is shown in the SessionAuthenticationModule overview topic.

void SessionAuthenticationModule_SignOutError(object sender, ErrorEventArgs e)
    System.Diagnostics.Trace.WriteLine("Handling SignOutError event");

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft