title: Could not load file or assembly 'MySql.Data' or one of its dependencies
body: <p>After exploring enough I've decided to post this question here. I'm facing this error in my WebApi project which is working very well on local IIS but when I deployed my project on my Live Server I'm facing this issue  <strong>Could not load file or assembly 'MySql.Data' or one of its dependencies</strong>. I'm working with MySql Database and added all the related dependencies in web.config file but nothing seems to be working out for me.</p>
  
  <p>my <strong>Web.Config</strong> file   </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;!--  
        http://go.microsoft.com/fwlink/?LinkId=301879
        --&gt;
      &lt;configuration&gt;
        &lt;configSections&gt;  
          &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
        &lt;/configSections&gt;
        &lt;connectionStrings&gt;
          &lt;add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-IntranetApiDemo-20180709022909.mdf;Initial Catalog=aspnet-IntranetApiDemo-20180709022909;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;        
  &lt;add name="DBCS" connectionString="Server=14.192.18.129;userid=admin;password=pwd; Database=db; convert zero datetime=True; default command timeout=0; SslMode = none" providerName="System.Data.MySqlClient" /&gt;
        &lt;/connectionStrings&gt;
        &lt;appSettings&gt;&lt;/appSettings&gt;
        &lt;system.web&gt;
          &lt;authentication mode="None" /&gt;
          &lt;compilation debug="true" targetFramework="4.5.2" /&gt;
          &lt;httpRuntime targetFramework="4.5.2" /&gt;
        &lt;/system.web&gt;
        &lt;system.webServer&gt;
          &lt;modules&gt;
            &lt;remove name="FormsAuthentication" /&gt;
          &lt;/modules&gt;
          &lt;handlers&gt;
            &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
            &lt;remove name="OPTIONSVerbHandler" /&gt;
            &lt;remove name="TRACEVerbHandler" /&gt;
            &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
          &lt;/handlers&gt;
        &lt;/system.webServer&gt;
        &lt;runtime&gt;
          &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /&gt;
              &lt;bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /&gt;
            &lt;/dependentAssembly&gt;
            &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /&gt;
              &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
            &lt;/dependentAssembly&gt;  
           &lt;dependentAssembly&gt;
              &lt;assemblyIdentity name="MySql.Data.MySqlClient" publicKeyToken="c5687fc88969c44d" /&gt;
              &lt;bindingRedirect oldVersion="1.0.0.0-6.10.7.0" newVersion="6.10.7.0" /&gt;
            &lt;/dependentAssembly&gt;    
          &lt;/assemblyBinding&gt;
        &lt;/runtime&gt;
        &lt;entityFramework&gt;
         &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/&gt;
          &lt;providers&gt;
              &lt;provider invariantName="MySql.Data.MySqlClient"
                  type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.7.0"/&gt;
              &lt;provider invariantName="System.Data.SqlClient"
                  type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/&gt;
          &lt;/providers&gt;
        &lt;/entityFramework&gt;
        &lt;system.codedom&gt;
          &lt;compilers&gt;
            &lt;compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" /&gt;
            &lt;compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&amp;quot;Web\&amp;quot; /optionInfer+" /&gt;
          &lt;/compilers&gt;
        &lt;/system.codedom&gt;
      &lt;/configuration&gt;
  </code></pre>
  
  <p>As you can see in my code above the verion of MySql.Data.Entity.EF6 <strong>(Version=6.10.7.0)</strong>  matches with the MySql.Data.MySqlClient <strong>Version =6.10.7.0</strong>.</p>
  
  <p>Is there anything which is missing in Web.Config file.
  Please help me to solve this problem.</p>
  
  <p><strong>Thanks.</strong></p>