Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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>
Posted
Comments
Bryian Tan 9-Jul-18 21:45pm    
did you deploy the dll?
Rohit Singh 10-Jul-18 3:03am    
I've deployed the complete project and under the Bin folder the required dll's is present

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900