Web Service Deployment not finding MySql

Discussion in 'Site Programming, Development and Design' started by BillyHo, Oct 9, 2012.

  1. I have built a web service that is to be hosted on IIS which is to connect to a MySql database that i am hosting on Winhost. It connects and functions fine from my local environment, but when i publish my service and try to invoke a web method i get the following error message:

    System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
    at WebService2.Service1.CheckUsername(String username)

    I am not sure how to go about fixing this.

    Any help would be greatly appreciated.
    Last edited by a moderator: Oct 14, 2015
  2. Problem solved, it appears in Visual Studio to get the dll to copy properly, i needed to set the Copy Local value of the Reference to be True.
  3. Ah, glad you worked it out.

Share This Page