ActiveDirectoryMembershipProvider.GetUser Method (Object, Boolean)

Gets the membership user information associated with the specified user key.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

'Declaration
Public Overrides Function GetUser ( _
	providerUserKey As Object, _
	userIsOnline As Boolean _
) As MembershipUser
'Usage
Dim instance As ActiveDirectoryMembershipProvider
Dim providerUserKey As Object
Dim userIsOnline As Boolean
Dim returnValue As MembershipUser

returnValue = instance.GetUser(providerUserKey, userIsOnline)
public MembershipUser GetUser (
	Object providerUserKey, 
	boolean userIsOnline
)
public override function GetUser (
	providerUserKey : Object, 
	userIsOnline : boolean
) : MembershipUser
Not applicable.

Parameters

providerUserKey

The unique identifier for the user.

userIsOnline

The GetUser method ignores this parameter.

Return Value

A MembershipUser instance representing the user specified. If no user is found in the Active Directory data store for the specified providerUserKey value, a null reference (Nothing in Visual Basic) is returned.

Exception typeCondition

InvalidOperationException

The GetUser method is called before the ActiveDirectoryMembershipProvider instance is initialized.

ArgumentException

providerUserKey is not of type SecurityIdentifier.

ArgumentNullException

providerUserKey is a null reference (Nothing in Visual Basic).

The GetUser method is called by the Membership class to retrieve information on the specified user from the Active Directory data store.

The search looks for a user instance where the objectSID attribute matches the providerUserKey parameter.

The provider uses a subtree search starting at the search point specified in the connection string. See the ActiveDirectoryMembershipProvider class topic for more information about connection strings.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: