System.Web.Security Namespace
.NET Framework version 2.0
Defines the contract that ASP.NET implements to provide membership services using custom membership providers.
Visibility |
Name |
Parameters |
Return Type |
public |
ChangePassword |
(
String
username
,
String
oldPassword
,
String
newPassword
)
|
Boolean
|
public |
ChangePasswordQuestionAndAnswer |
(
String
username
,
String
password
,
String
newPasswordQuestion
,
String
newPasswordAnswer
)
|
Boolean
|
public |
CreateUser |
(
String
username
,
String
password
,
String
email
,
String
passwordQuestion
,
String
passwordAnswer
,
Boolean
isApproved
,
Object
providerUserKey
,
MembershipCreateStatus&
status
)
|
MembershipUser
|
protected |
DecryptPassword |
(
Byte
encodedPassword
)
|
Byte
|
public |
DeleteUser |
(
String
username
,
Boolean
deleteAllRelatedData
)
|
Boolean
|
protected |
EncryptPassword |
(
Byte
password
)
|
Byte
|
protected |
EncryptPassword |
(
Byte
password
,
MembershipPasswordCompatibilityMode
legacyPasswordCompatibilityMode
)
|
Byte
|
public |
FindUsersByEmail |
(
String
emailToMatch
,
Int32
pageIndex
,
Int32
pageSize
,
Int32&
totalRecords
)
|
MembershipUserCollection
|
public |
FindUsersByName |
(
String
usernameToMatch
,
Int32
pageIndex
,
Int32
pageSize
,
Int32&
totalRecords
)
|
MembershipUserCollection
|
public |
GetAllUsers |
(
Int32
pageIndex
,
Int32
pageSize
,
Int32&
totalRecords
)
|
MembershipUserCollection
|
public |
GetNumberOfUsersOnline |
( )
|
Int32
|
public |
GetPassword |
(
String
username
,
String
answer
)
|
String
|
public |
GetUser |
(
Object
providerUserKey
,
Boolean
userIsOnline
)
|
MembershipUser
|
public |
GetUser |
(
String
username
,
Boolean
userIsOnline
)
|
MembershipUser
|
public |
GetUserNameByEmail |
(
String
email
)
|
String
|
protected |
OnValidatingPassword |
(
ValidatePasswordEventArgs
e
)
|
Void
|
public |
ResetPassword |
(
String
username
,
String
answer
)
|
String
|
public |
UnlockUser |
(
String
userName
)
|
Boolean
|
public |
UpdateUser |
(
MembershipUser
user
)
|
Void
|
public |
ValidateUser |
(
String
username
,
String
password
)
|
Boolean
|
|
ASP.NET membership is designed to enable you to easily use a number of different membership providers for your ASP.NET applications. You can use the supplied membership providers that are included with the .NET Framework, or you can implement your own provider.
When implementing a custom membership provider, you are required to inherit the MembershipProvider abstract class.
There are two primary reasons for creating a custom membership provider.
- You need to store membership information in a data source that is not supported by the membership providers included with the .NET Framework, such as a FoxPro database, an Oracle database, or other data source.
- You need to manage membership information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. A common example of this would be membership data that already exists in a SQL Server database for a company or Web site.
The MembershipProvider abstract class inherits from the ProviderBase abstract class. MembershipProvider implementations must also implement the required members of ProviderBase.
Membership Class MembershipUser Class
|
|