Share via


AuthenticationService.Logout Method (Boolean)

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Asynchronously logs out an authenticated user from the server with the specified value indicating whether an exception is thrown for errors.

Namespace:  System.ServiceModel.DomainServices.Client.ApplicationServices
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

Syntax

'Declaration
Public Function Logout ( _
    throwOnError As Boolean _
) As LogoutOperation
'Usage
Dim instance As AuthenticationService
Dim throwOnError As Boolean
Dim returnValue As LogoutOperation

returnValue = instance.Logout(throwOnError)
public LogoutOperation Logout(
    bool throwOnError
)
public:
LogoutOperation^ Logout(
    bool throwOnError
)
member Logout : 
        throwOnError:bool -> LogoutOperation 
public function Logout(
    throwOnError : boolean
) : LogoutOperation

Parameters

  • throwOnError
    Type: System.Boolean
    true if an unhandled error should result in an exception; otherwise, false.

Return Value

Type: System.ServiceModel.DomainServices.Client.ApplicationServices.LogoutOperation
The result of the operation.

Exceptions

Exception Condition
InvalidOperationException

This method is called while another asynchronous operation is still being processed.

Remarks

This method starts an operation with no complete action or user state. If this method returns normally, a LoggedOut event may be raised. Also, successful completion of this operation will update the User. To handle an operation error, MarkErrorAsHandled can be called from the operation completion callback or from a Completed event handler.

See Also

Reference

AuthenticationService Class

Logout Overload

System.ServiceModel.DomainServices.Client.ApplicationServices Namespace