Share via


WebAuthenticationService.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.Web (in System.ServiceModel.DomainServices.Client.Web.dll)

Syntax

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

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

Return Value

Type: System.Security.Principal.IPrincipal
The new user.

Exceptions

Exception Condition
InvalidOperationException

DomainContext is nulla null reference (Nothing in Visual Basic) and a new instance cannot be created.

Remarks

Creates a user by deserializing one from the application init params. If no user was included, one will be created by using the default constructor.

See Also

Reference

WebAuthenticationService Class

System.ServiceModel.DomainServices.Client.ApplicationServices Namespace