This is a migrated thread and some comments may be shown as answers.

MySql Deployment Problem

3 Answers 145 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jay
Top achievements
Rank 1
Jay asked on 25 Sep 2009, 02:21 PM
I've deployed my application that uses OpenAccess to work with a mysql database to a shared hosting environment.  I've copied all of the dll files in the OpenAccess bin directory to the website bin directory but I get the error below.  Is there an assembly I may be missing?  The hosting environment is under medium trust but I've configured OpenAccess to run under medium trust.

Here are the dlls that are deployed
  • Telerik.OpenAccess.Runtime.dll
  • Telerik.OpenAccess.Query.dll
  • Telerik.OpenAccess.NTDS.dll
  • Telerik OpenAccess.MySql.Data.dll
  • Telerik.OpenAccess.dll
  • Telerik.OpenAccess.Config.dll
  • Telerik.OpenAccess.Adonet2.dll
  • Telerik.OpenAccess.40.dll
  • mysql.data.dll
  • ICSharpCode.SharpZipLib.dll

Could not load file or assembly 'MYSQLD~2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MYSQLD~2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MYSQLD~2' could not be loaded.

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].

Stack Trace: 

[FileLoadException: Could not load file or assembly 'MYSQLD~2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142   System.Reflection.Assembly.Load(String assemblyString) +28   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46[ConfigurationErrorsException: Could not load file or assembly 'MYSQLD~2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8809426   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128   System.Web.Compilation.BuildManager.CompileCodeDirectories() +265   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320[HttpException (0x80004005): Could not load file or assembly 'MYSQLD~2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729[HttpException (0x80004005): Could not load file or assembly 'MYSQLD~2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

3 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 28 Sep 2009, 09:44 AM
Hi Ben Friedman,

As I can see, you have all the necessary assemblies in the bin. However, it seems that the .Net Assembly Loader is unable to find the right assembly (with the requested version) but it finds an assembly with different version. Please check if the web.config file has a reference to the mysql.data.dll library that specifies particular version to be used. If there is such reference, you can try removing it, this way the dll from the bin directory will be used instead of the installed one in the GAC.

Sincerely yours,
Damyan Bogoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jay
Top achievements
Rank 1
answered on 28 Sep 2009, 02:24 PM
I checked and there are no references to a mysql assembly in the web.config file.  The application previously used nhibernate with the mysql dll without a problem.  I have removed nhibernate along with any such references and OA is the only component that uses mysql now.  Any other ideas?
0
Damyan Bogoev
Telerik team
answered on 30 Sep 2009, 05:14 PM
Hi Ben Friedman,

Can you please try the following workaround:

  • Open the App.config file
  • Locate the backendconfiguration node
  • Add the driver="mysqlopenaccess" attribute to the backendconfiguration node
After you complete these steps, the backendconfiguration should look like this:

<backendconfiguration id="mysqlConfiguration" backend="mysql" driver="mysqlopenaccess">. 

I hope that works for you.

Regards,
Damyan Bogoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Databases and Data Types
Asked by
Jay
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Jay
Top achievements
Rank 1
Share this question
or