confusing exception with MySql.Web.Security.MySQLMembershipProvider
Posted by: Fred Bartlett
Date: September 25, 2014 09:45AM

Targeting ASP.NET MVC 4, using connector/NET 6.9.3 on win7/64

I have a new local instance of MySql, as well as a remote instance.

I used the MySql Website Configure tool in VS2013 to configure web.config

I tested the connection string for "LocalMySqlServer" using both VS Server Explorer as well as MySql Workbench, and connects fine.

When I try to launch the app I get the following startup error:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load type 'MySql.Data.MySqlClient.MySqlConnection' from assembly 'MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.

Source Error:


Line 49: <providers>
Line 50: <remove name="MySQLMembershipProvider" />
Line 51: <add name="MySQLMembershipProvider"

type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" applicationName="X_NAV_DMSEC" description="MySqlSimpleMembership Application" connectionStringName="LocalMySqlServer" writeExceptionsToEventLog="False" autogenerateschema="True" enableExpireCallback="False" enablePasswordRetrieval="False" enablePasswordReset="True" requiresQuestionAndAnswer="True" requiresUniqueEmail="False" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
Line 52: </providers>
Line 53: </membership>

Source File: C:\x-nav-dm-repo.git\branches\Case-Added\NAV-X-DM\X-NAV-DMSEC\web.config Line: 51

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237


MySql.Web.V20.dll is in the GAC and also locally copied to Bin folder.



The above error message, Could not load type 'MySql.Data.MySqlClient.MySqlConnection' from assembly 'MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.

is a little confusing, because 'MySql.Data.MySqlClient.MySqlConnection is found in assembly "MySql.Data" not MySql.Web.v20. I've assumed this is because of a connection string issue, but no joy.

I've also tried setting my "DefaultConnection" to be identical to "LocalMySqlServer" value with no effect.

This test app was originally configured to use SQL and a local DB, and that worked. After conversion using the MySql Website configuration tool, this error has appeared.

The target named schema/db exists on the local MySql instance, but there are no tables defined such as User. (These are autogenerated using the SQL scheme, and I thought they'd be autogenerated using MySql. But no joy. I'm going to try creating the tables manually and see if that works, but there is no indication in the MySql logs of any failures like this. The error in the Event logs is identical to the error above. Something is trying to pull a a type from the wrong assembly and failing?

Options: ReplyQuote


Subject
Written By
Posted
confusing exception with MySql.Web.Security.MySQLMembershipProvider
September 25, 2014 09:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.