Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In my server saying "Could not load file or assembly 'MySql.Web..." but I have mysql in my application

    Parser Error Message: Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

...

    Line 240:      <providers>
    Line 241: <add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.7.4.0, 

.....

Resolved to putting the tag in the web.config file the following line:

<remove name="MySQLMembershipProvider"/>

I do not have access to the server settings to remove mysql. But there is another way to solve this that does not happen again?

like image 915
Marcos Freitas Avatar asked Jan 10 '14 02:01

Marcos Freitas


1 Answers

I got this error when deploying a website to the server (but not when debugging).

To fix it, select References -> MySql.Data and set the Copy Local parameter to True. When deployed on the server you can verify this by the presence of the MySql.Data.dll in the bin folder.

like image 172
user6923055 Avatar answered Nov 01 '22 20:11

user6923055