Membership Provider and Unit Testing

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
krmbluek
Posts: 8
Joined: Tue 06 Jan 2009 08:57

Membership Provider and Unit Testing

Post by krmbluek » Thu 08 Apr 2010 22:38

I would like to be able to run unit tests on the membership provider since I have wrapped it in my own classes. However I get the following error:
Failed: System.TypeLoadException : Could not load type 'Devart.Data.MySql.Web.Providers.MySqlMembershipProvider' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Can I run unit tests on the the Membership Provider?

Here is my app.config file:
























This is running in a seperate dll and I am using nunit.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 12 Apr 2010 11:52

Please try adding references to the Devart assemblies in your application. For example, you may add the following to the compilation.assemblies node of web.config:

Code: Select all



(set the versions of assemblies that you are using instead of 5.70.120 and 5.0.81).

Please tell us if the problem persists.

krmbluek
Posts: 8
Joined: Tue 06 Jan 2009 08:57

I get the same error after trying this

Post by krmbluek » Tue 20 Apr 2010 02:57

Here is my web.config file and the error:




....




......





























Error:

failed: System.TypeLoadException : Could not load type 'Devart.Data.MySql.Web.Providers.MySqlMembershipProvider' from assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 20 Apr 2010 14:39

Please check that you have proper entry for dotConnect for MySQL in the node of your machine.config. Please see this entry in the Deployment section of our documentation:
http://www.devart.com/dotconnect/mysql/ ... yment.html

Also, you may send us a test project so that we are able to investigate the problem in more details.

EvereQ
Posts: 1
Joined: Tue 03 Aug 2010 14:28

Post by EvereQ » Tue 03 Aug 2010 14:32

As solution, make sure you try to put type="Devart.Data.MySql.Web.Providers.MySqlMembershipProvider, Devart.Data.MySql.Web" instead of just "Devart.Data.MySql.Web.Providers.MySqlMembershipProvider" in your app.config membership provider configuration section (same like for others DevArt providers)

Post Reply