Error in webservice after posting

I created a webservice when it was hosted on my local machine it works fine, but when I publish it to the webhost it doesn't work anymore, I guess his question is about how the webserver is configured, but can I do I make some changes to the web.config to make it work?

The error I am getting is below:

Configuration Error Description: An error occurred while processing the configuration file required to service this request. Check out the specific error details below and modify your config file accordingly.

Parser error message: Could not load file or assembly 'MySql.Data, Version = 5.0.9.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

Source error:

Line 37: Line 38: Line 39: Line 40: Line 41:

Source file: c: \ webs \ talkactive \ gb1634 \ qaz.dk \ web.config Line: 39

Assembly loading trace. The following information may be helpful in determining why the assembly "MySql.Data, Version = 5.0.9.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d" could not be loaded.

The webservice uses a C # class placed in the app_code folder. This C # class uses mysql. When I use the class in a normal .aspx file it works fine

+1


source to share


3 answers


I guess it would be obvious to check if the MySql.Data files exist in the GAC (or the bin folder of the web service) on the server and contains the correct version and public key?



+2


source


Basically, you are missing this DLL. You have to place it in the bin directory of your web service.



+1


source


There can also be a version conflict between the MySql client you want and what is installed on the server. You can add the following section to your web.config file and specify the correct key / key you need:

<compilation debug="false">
   <assemblies>       
      <add assembly="MySql.Data, Version=5.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
    </assemblies>
</compilation>

      

0


source







All Articles