MySQL install problem

Topics: ASP.NET 2.0
Jan 19, 2009 at 9:41 PM
Hi folks,

I'm getting the below error when trying to run my BE with MySQL (my server is running 5.0.46 MySQL rather than as original source contains).

Any ideas of what I need to do in order to get this to work? From the info it looks like something isn't set up for the MySQL on my .NET solution but I can't tell what when it simply tells me to enable error logging.

Many thanks


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 file or assembly 'MySql.Data, Version=5.0.46, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 49: 		<compilation debug="true">
Line 50: 			<assemblies>
Line 51:         <add assembly="MySql.Data, Version=5.0.46, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
Line 52: 				<add assembly="System.Management, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 53: 				<add assembly="System.Configuration, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

Source File: D:\home\\wwwroot\news\web.config    Line: 51

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=5.0.46, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Jan 25, 2009 at 3:09 PM
First, go here and download your preference of driver:

Then either add the project to VS and/or add a reference to the project or dll.

Next, in the web.config, delete the areas highlighted in red.

      <clear />
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
           description=".Net Framework Data Provider for MySQL"
           type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data ,
               Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d
" />
        <compilation debug="true">
        <add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
                <add assembly="System.Management, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Configuration, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Data, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Drawing, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Xml, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>