This documentation is archived and is not being maintained.

ActiveDirectoryMembershipUser Constructor (String, String, Object, String, String, String, Boolean, Boolean, DateTime, DateTime, DateTime, DateTime, DateTime)

Creates a new instance of the ActiveDirectoryMembershipUser class with the specified property values.

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

'Declaration
Public Sub New ( _
	providerName As String, _
	name As String, _
	providerUserKey As Object, _
	email As String, _
	passwordQuestion As String, _
	comment As String, _
	isApproved As Boolean, _
	isLockedOut As Boolean, _
	creationDate As DateTime, _
	lastLoginDate As DateTime, _
	lastActivityDate As DateTime, _
	lastPasswordChangedDate As DateTime, _
	lastLockoutDate As DateTime _
)

Parameters

providerName
Type: System.String
The ProviderName for the membership user.
name
Type: System.String
The UserName for the membership user.
providerUserKey
Type: System.Object
The ProviderUserKey for the membership user.
email
Type: System.String
The Email address of the membership user.
passwordQuestion
Type: System.String
The PasswordQuestion for the membership user.
comment
Type: System.String
The Comment for the membership user.
isApproved
Type: System.Boolean
The IsApproved value for the membership user.
isLockedOut
Type: System.Boolean
The IsLockedOut value for the membership user.
creationDate
Type: System.DateTime
The CreationDate for the membership user.
lastLoginDate
Type: System.DateTime
The LastLoginDate for the membership user. This parameter is not used.
lastActivityDate
Type: System.DateTime
The LastActivityDate for the membership user. This parameter is not used.
lastPasswordChangedDate
Type: System.DateTime
The LastPasswordChangedDate for the membership user.
lastLockoutDate
Type: System.DateTime
The LastLockoutDate for the membership user.

ExceptionCondition
ArgumentException

providerUserKey is not a SecurityIdentifier object.

- or -

providerName is Nothing and a provider is not set in the application's configuration file.

Creating a new ActiveDirectoryMembershipUser object does not add a new membership user object to the membership data store. To add a new membership user to the membership data store, use the CreateUser method. Note that the CreateUser method returns an ActiveDirectoryMembershipUser object for the membership user added to the data store.

ActiveDirectoryMembershipUser objects are commonly constructed in application code for use with the UpdateUser method, although you can also pass an ActiveDirectoryMembershipUser object returned from the CreateUser, GetUser, GetAllUsers, FindUsersByName, or FindUsersByEmail method to the UpdateUser method as well.

ActiveDirectoryMembershipUser objects are also commonly constructed by membership provider implementations for the CreateUser, GetUser, GetAllUsers, UpdateUser, FindUsersByName, and FindUsersByEmail methods.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: