Page 1 of 1

Could not load type ...MySqlMembershipProvider

Posted: Wed 04 Jun 2008 16:16
by MrBishop
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

	
		
	

...

		
			
			
		
		
			
		
		
			
				
				
			
		
		
			
				
			
		
		
			
                
                
				
			
		

Posted: Thu 05 Jun 2008 08:30
by Alexey.mdr
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.

Posted: Thu 05 Jun 2008 13:04
by MrBishop
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.