antmx, does this have to go into a separate project from the main one where it is used? I simply created a new class within my main project (LT) like so:
==== In Class COBWEBMembershipProvider.vb
Imports System.Reflection
Namespace COBWEB
Public Class COBWEBMembershipProvider
Inherits SqlMembershipProvider
Public Overrides Sub Initialize(ByVal name As String, ByVal config As System.Collections.Specialized.NameValueCollection)
Me.Initialize(name, config)
' Update the private connection string field in the base class.
Dim connString As String = "Data Source=Some Connection String Here"
' Set private membership provider property. Reflection is used to discover the attributes of a field and
' provide access to the field metadata.
' Note: Not sure about the parameter for GetType. C# example did not have it, but VB needs something.
Dim connStringField As FieldInfo = GetType(FieldInfo).BaseType.GetField("_sqlConnectionString", BindingFlags.Instance Or _
BindingFlags.NonPublic)
connStringField.SetValue(Me, connString)
End Sub
End Class
End Namespace
Add added this to my web.config
===== In Web.Config
<membership defaultProvider="COBWEBMembershipProvider">
<providers>
<clear/>
<add name="COBWEBMembershipProvider"
type="COBWEB.COBWEBMembershipProvider, LT"
connectionStringName="LTDummy"
applicationName="LT"
enablePasswordRetrieval="false"
enablePasswordReset="true"
minRequiredPasswordLength="5"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""/>
</providers>
</membership>
But i get this error:
System Message: Could not load type 'COBWEB.COBWEBMembershipProvider'
from assembly 'LT'. (C:\Inetpub\wwwroot\LT\LT\LT\web.config line 33)
I'm looling at the Toolkit Sample Providers now.