I am trying to write a Membership Provider but keep getting the error that the site "Could not load type 'OdbcMembershipProvider'".
I'd really appreciate it if someone could review this code and help me with this.
Here's an exerpt from my web.config file.
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="MyConnection" connectionString="Data Source=XYZ;User ID=******;Password=******;Unicode=False" providerName="System.Data.OracleClient"/>
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<roleManager enabled="true"/>
<authentication mode="Forms">
<forms name=".UIDCOOKIE"
loginUrl="Login.aspx" />
</authentication>
</system.web>
<location path="default.aspx" />
<system.web>
<authorization>
<allow roles="Administrator"/>
<allow roles="User"/>
<allow roles="Clerk"/>
<deny users="?" />
</authorization>
<membership defaultProvider="OdbcMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<add
name="OdbcMembershipProvider"
type="OdbcMembershipProvider"
connectionStringName="MyConnection"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
writeExceptionsToEventLog="true"
applicationName="/"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="3"
passwordAttemptWindow="15"
passwordStrengthRegularExpression='@\"(?=.{6,})(?= (.*\d){1,})(?=(.*\W){1,})' />
</providers>
</membership>
</system.web>
</configuration>
I have created a class file named 'OdbcMembershipProvider.
vb' in my site. Here is the beginning of that file:
Imports System.Web.Security
Imports System.Configuration.Provider
Imports System.Collections.Specialized
Imports System
Imports System.Data
Imports System.Data.Odbc
Imports System.Configuration
Imports System.Diagnostics
Imports System.Web
Imports System.Globalization
Imports System.Security.Cryptography
Imports System.Text
Imports System.Web.Configuration
Namespace OdbcMembershipProvider
Public Class OdbcMembershipProvider
Inherits MembershipProvider
.
.
.