Could not load type ...MySqlMembershipProvider

Could not load type ...MySqlMembershipProvider

Postby MrBishop » Wed 04 Jun 2008 16:16

I started a new Web Application Project in VS 2008 (DotNet 2.0). I copy/pasted my web.config and have a couple basic pages set up. Everything compiled fine, but when I went to test it, I received the following error:
Code: Select all
"Could not load type 'CoreLab.MySql.Web.Providers.MySqlMembershipProvider'."

Through trial and error, I found that if I comment out each of the sections in my roleManager, profile, and membership sections in web.config, my web app runs fine. However, if I leave them in, for each section I'll run into an error about not being able to load MySqlMembershipProvider, AspNetMySqlProfileProvider, etc.

I have references to CoreLab.Data, CoreLab.MySql, and CoreLab.MySql.Web. Also, this exact same config file works fine in another project (Web Site project that was upgraded from VS 2005 to 2008).

Here are the relevant parts of my config file. Some things are commented out from just trying different things.:
Code: Select all
                   connectionString="User Id=***;Password=***;Host=***;Database=porkdex"/>





                     connectionStringName="MySqlServices" enablePasswordRetrieval="false"
                     enablePasswordReset="true" requiresQuestionAndAnswer="false"
                     requiresUniqueEmail="false" passwordFormat="Hashed"
                     maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"
                     minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0"/>


                           enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES"
                     cookieTimeout="30" cookiePath="/" cookieProtection="All">




Posts: 13
Joined: Tue 31 Oct 2006 19:29

Postby Alexey.mdr » Thu 05 Jun 2008 08:30


Could you check that you reference needed Core Lab libraries (versions may vary)
Code: Select all



Also, please check the connection string name in AspNetMySqlRoleProvider .

Additionally, don't forget to specify MySqlServices connection string in the web.config.

Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby MrBishop » Thu 05 Jun 2008 13:04

Ok, it turns out that, even though I had added references to the CoreLab assemblies in the project, they weren't set to "Copy Local". After setting that property to true for those assemblies everything worked again.
Posts: 13
Joined: Tue 31 Oct 2006 19:29

Return to dotConnect for MySQL