Click here to Skip to main content
15,878,748 members
Articles / Web Development / IIS

Custom MembershipProvider and RoleProvider Implementations that use Web Services

Rate me:
Please Sign up or sign in to vote.
4.70/5 (85 votes)
4 Oct 2009CPOL7 min read 1M   8.3K   251  
Custom MembershipProvider and RoleProvider implementations that use web services in order to separate the application and database servers.
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
 
Public Class MembershipUser
  Public  Sub New()
    '
    ' TODO: Add constructor logic here
    '
  End Sub
 
    Private _comment As String

    Public Property Comment() As String
        Get
            Return _comment
        End Get
        Set(ByVal Value As String)
            _comment = value
        End Set
    End Property
 
    Private _creationDate As DateTime

    Public Property CreationDate() As DateTime
        Get
            Return _creationDate
        End Get
        Set(ByVal Value As DateTime)
            _creationDate = value
        End Set
    End Property
 
    Private _email As String
 
  Public Property Email() As String
  	Get 
            Return _email
  	End Get
  	Set (ByVal Value As String) 
            _email = Value
  	End Set
  End Property
 
    Private _isApproved As Boolean
 
  Public Property IsApproved() As Boolean
  	Get 
            Return _isApproved
  	End Get
  	Set (ByVal Value As Boolean) 
            _isApproved = Value
  	End Set
  End Property
 
    Private _isLockedOut As Boolean
 
  Public Property IsLockedOut() As Boolean
  	Get 
            Return _isLockedOut
  	End Get
  	Set (ByVal Value As Boolean) 
            _isLockedOut = Value
  	End Set
  End Property
 
    Private _isOnline As Boolean
 
  Public Property IsOnline() As Boolean
  	Get 
            Return _isOnline
  	End Get
  	Set (ByVal Value As Boolean) 
            _isOnline = Value
  	End Set
  End Property
 
    Private _lastActivityDate As DateTime
 
  Public Property LastActivityDate() As DateTime
  	Get 
            Return _lastActivityDate
  	End Get
  	Set (ByVal Value As DateTime) 
            _lastActivityDate = Value
  	End Set
  End Property
 
    Private _lastLockoutDate As DateTime
 
  Public Property LastLockoutDate() As DateTime
  	Get 
            Return _lastLockoutDate
  	End Get
  	Set (ByVal Value As DateTime) 
            _lastLockoutDate = Value
  	End Set
  End Property
 
    Private _lastLoginDate As DateTime
 
  Public Property LastLoginDate() As DateTime
  	Get 
            Return _lastLoginDate
  	End Get
  	Set (ByVal Value As DateTime) 
            _lastLoginDate = Value
  	End Set
  End Property
 
    Private _lastPasswordChangedDate As DateTime
 
  Public Property LastPasswordChangedDate() As DateTime
  	Get 
            Return _lastPasswordChangedDate
  	End Get
  	Set (ByVal Value As DateTime) 
            _lastPasswordChangedDate = Value
  	End Set
  End Property
 
    Private _passwordQuestion As String
 
  Public Property PasswordQuestion() As String
  	Get 
            Return _passwordQuestion
  	End Get
  	Set (ByVal Value As String) 
            _passwordQuestion = Value
  	End Set
  End Property
 
    Private _providerName As String
 
  Public Property ProviderName() As String
  	Get 
            Return _providerName
  	End Get
  	Set (ByVal Value As String) 
            _providerName = Value
  	End Set
  End Property
 
    Private _providerUserKey As Object
 
  Public Property ProviderUserKey() As Object
  	Get 
            Return _providerUserKey
  	End Get
  	Set (ByVal Value As Object) 
            _providerUserKey = Value
  	End Set
  End Property
 
    Private _userName As String
 
  Public Property UserName() As String
  	Get 
            Return _userName
  	End Get
  	Set (ByVal Value As String) 
            _userName = Value
  	End Set
  End Property
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Employed (other) Purplebricks
Australia Australia
All articles are supplied as-is, as a howto on a particular task that worked for me in the past. None of the articles are supposed to be out-of-the-box freeware controls and nor should they be treated as such. Caveat emptor.

Now living and working in Australia, trying to be involved in the local .NET and Agile communities when I can.

I spend a good chunk of my spare time building OpenCover and maintaining PartCover both of which are Code Coverage utilities for .NET.

Comments and Discussions