Share via


AuthenticationService.Login Method (String, String)

[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 authenticates and logs in to the server with the specified user name and password.

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

Syntax

'Declaration
Public Function Login ( _
    userName As String, _
    password As String _
) As LoginOperation
'Usage
Dim instance As AuthenticationService
Dim userName As String
Dim password As String
Dim returnValue As LoginOperation

returnValue = instance.Login(userName, _
    password)
public LoginOperation Login(
    string userName,
    string password
)
public:
LoginOperation^ Login(
    String^ userName, 
    String^ password
)
member Login : 
        userName:string * 
        password:string -> LoginOperation 
public function Login(
    userName : String, 
    password : String
) : LoginOperation

Parameters

  • userName
    Type: System.String
    The user name associated with the user to authenticate.
  • password
    Type: System.String
    The password associated with the user to authenticate.

Return Value

Type: System.ServiceModel.DomainServices.Client.ApplicationServices.LoginOperation
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 LoggedIn event may be raised. Also, successful completion of this operation will update the User.

See Also

Reference

AuthenticationService Class

Login Overload

System.ServiceModel.DomainServices.Client.ApplicationServices Namespace