Could not load type ...MySqlMembershipProvider

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
MrBishop
Posts: 13
Joined: Tue 31 Oct 2006 19:29

Could not load type ...MySqlMembershipProvider

Post by 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

	
		
	

...

		
			
			
		
		
			
		
		
			
				
				
			
		
		
			
				
			
		
		
			
                
                
				
			
		

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 05 Jun 2008 08:30

Hello,

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 .
connectionStringName="MySqlServicesString"
->
connectionStringName="MySqlServices"

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

Regards,
Alexey.

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

Post by 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.

Post Reply