AuthenticationBase<T>.GetAnonymousUser 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.]

Gets an anonymous user.

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

Syntax

'Declaration
Protected Overridable Function GetAnonymousUser As T
'Usage
Dim returnValue As T

returnValue = Me.GetAnonymousUser()
protected virtual T GetAnonymousUser()
protected:
virtual T GetAnonymousUser()
abstract GetAnonymousUser : unit -> 'T 
override GetAnonymousUser : unit -> 'T 
protected function GetAnonymousUser() : T

Return Value

Type: T
The anonymous user. This value is never nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
InvalidOperationException

The attempt to create a new anonymous user resulted in nulla null reference (Nothing in Visual Basic).

Remarks

This method is invoked from the Logout method and the GetUser method for anonymous users. By default, the user is populated with data from Roles and ProfileBase. The base implementation does not need to be invoked when this method is overridden.

See Also

Reference

AuthenticationBase<T> Class

System.ServiceModel.DomainServices.Server.ApplicationServices Namespace