AuthenticationService Class
[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.]
Provides a base class for services that authenticate, load, and save the current user.
System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationService
System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService
Namespace: System.ServiceModel.DomainServices.Client.ApplicationServices
Assembly: System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)
The AuthenticationService type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AuthenticationService | Initializes a new instance of the AuthenticationService class. |
| Name | Description | |
|---|---|---|
![]() | IsBusy | Gets a value indicating whether an asynchronous operation is in progress. |
![]() | IsLoadingUser | Gets a value indicating whether an asynchronous LoadUser operation is in progress. |
![]() | IsLoggingIn | Gets a value indicating whether an asynchronous Login operation is in progress. |
![]() | IsLoggingOut | Gets a value indicating whether an asynchronous Logout operation is in progress. |
![]() | IsSavingUser | Gets a value indicating whether an asynchronous SaveUser operation is in progress. |
![]() | SupportsCancellation | Gets a value indicating whether this authentication implementation supports cancellation. |
![]() | User | Gets a principal representing the authenticated user. |
| Name | Description | |
|---|---|---|
![]() | BeginLoadUser | Begins an asynchronous LoadUser operation. |
![]() | BeginLogin | Begins an asynchronous Login operation. |
![]() | BeginLogout | Begins an asynchronous Logout operation. |
![]() | BeginSaveUser | Begins an asynchronous SaveUser operation. |
![]() | CancelLoadUser | Cancels an asynchronous LoadUser operation. |
![]() | CancelLogin | Cancels an asynchronous Login operation. |
![]() | CancelLogout | Cancels an asynchronous Logout operation. |
![]() | CancelSaveUser | Cancels an asynchronous SaveUser operation. |
![]() | CreateDefaultUser | Creates a default user. |
![]() | EndLoadUser | Ends an asynchronous LoadUser operation. |
![]() | EndLogin | Ends an asynchronous Login operation. |
![]() | EndLogout | Ends an asynchronous Logout operation. |
![]() | EndSaveUser | Ends an asynchronous SaveUser operation. |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | LoadUser | Asynchronously loads the authenticated user from the server. |
![]() | LoadUser(Action(Of LoadUserOperation), Object) | Asynchronously loads the authenticated user from the server with specified callback method and user state. |
![]() | Login(LoginParameters) | Asynchronously authenticates and logs in to the server with the specified parameters. |
![]() | Login(String, String) | Asynchronously authenticates and logs in to the server with the specified user name and password. |
![]() | Login(LoginParameters, Action(Of LoginOperation), Object) | Asynchronously authenticates and logs in to the server with the specified parameters, callback method, and user state. |
![]() | Logout(Boolean) | Asynchronously logs out an authenticated user from the server with the specified value indicating whether an exception is thrown for errors. |
![]() | Logout(Action(Of LogoutOperation), Object) | Asynchronously logs out an authenticated user from the server with the specified callback method and user state. |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | OnPropertyChanged | Raises a PropertyChanged event. |
![]() | RaisePropertyChanged | Raises a PropertyChanged event for the specified property. |
![]() | SaveUser(Boolean) | Asynchronously saves the authenticated user to the server with the specified value indicating whether an exception is thrown for errors. |
![]() | SaveUser(Action(Of SaveUserOperation), Object) | Asynchronously saves the authenticated user to the server with the specified callback method and user state. |
![]() | ToString | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | INotifyPropertyChanged.PropertyChanged | Occurs every time a property value changes. |
This abstract base class exposes Login, Logout, LoadUser, and SaveUser as asynchronous operations. It also provides a number of properties that can be bound to, including IsBusy and User.
Implementations of this class will have a much different view by using several abstract template methods. These methods follow the asynchronous result pattern and are presented in Begin/End pairs for each operation. Optionally, cancel methods for each operation can also be implemented.
For a complete example of implementing an authentication service, see Walkthrough: Using Authentication Service with Silverlight Navigation Application.

