Hello, I'm creating a webApi Project for simple get request. I'm using MySql as database. Everything was working fine until I'm using it on my Local IIS Server but when I deployed my project on production server it shows below error
Server Error in '/SAMPLEAPI' Application
Parser Error Message: Could not load file or assembly 'MySql.Data' or one of its dependencies. The system cannot find the file specified
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
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]
Below is my code fom web.config file.
Note: I've already installed the MySql dll from Nuget Package and it also matches the version which I've mentioned in my web.config file.
What I have tried:
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>