Compartilhar via


AuthenticationService.CreateDefaultUser Method

[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.]

Creates a default user.

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

Syntax

'Declaration
Protected MustOverride Function CreateDefaultUser As IPrincipal
'Usage
Dim returnValue As IPrincipal

returnValue = Me.CreateDefaultUser()
protected abstract IPrincipal CreateDefaultUser()
protected:
virtual IPrincipal^ CreateDefaultUser() abstract
abstract CreateDefaultUser : unit -> IPrincipal 
protected abstract function CreateDefaultUser() : IPrincipal

Return Value

Type: System.Security.Principal.IPrincipal
The user that was created.

Exceptions

Exception Condition
InvalidOperationException

This operation returns nulla null reference (Nothing in Visual Basic).

Remarks

This method is invoked when you access the User property before the User property is set. The returned value is then stored in the User property until you get a new user instance by calling the Login, Logout, or LoadUser method.

See Also

Reference

AuthenticationService Class

System.ServiceModel.DomainServices.Client.ApplicationServices Namespace