I am trying to get a new application that is an ASP.Net 2.0 app connecting to a MySQL DB. It works fine for the developer on her local machine connecting to the DB here on JH servers. It also works fine on the server it is moving from. However, on here, we keep getting this error:
We have the code using the new assemblies, but we’re now getting another issue:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly ‘MySql.Data, Version=1.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Line 22:
Some of the news groups point this to be a version mismatch of some kind. Can you shed any light on how to correct this?
I think this error only occurs if the assembly version in your Bin directory does not match the one you’re attempting to load in the Web.config.
It should also occur on any other machines with the same files, unless that machine happens to have the 1.0.9.0 version installed in the GAC (global assembly cache).
I would recommend against relying on the GAC to supply the required version of the assembly in a shared hosting environment. 1.0.9 is the latest version, so you should be ok by downloading it here and putting the DLLs in your website’s Bin directory.
Thanks for the insight, I believe the developer has the dll in the bin directory, but it doesn’t appear to be working quite right. I’ll forward this on and see what happens.
Still not working. The developer is getting very frustrated. Is there any reason why using regular ODBC through a DSN doesn’t work? There has to be some sort of error logs that shows either a permissions issue or something.
Stephen, would you be able to please look into this for me and let me know what is going on? There is a ticket in support under #ENX-36689-782.
Again, the hard part that I don’t understand is that the code works great on another server with another provider. Windows 2003 with IIS6. It just refuses to run on JH servers.
Also, the error since removing the assemblies has changed to this:
BC30456: ‘CreateResourceBasedLiteralControl’ is not a member of ‘ASP.site_public_master’.
The only solutions I’ve been able to find online is that the namespace is named for a reserve name, but it doesn’t look to be the case in this instance.
I don’t have time to look into it right now, but that sounds like you might be missing some resources file(s). Have you checked if all the App_Data and/or *.resx files are uploaded?
Subspace, I believe all the files have been uploaded. Even doing a straight copy from the old server to the JH servers, and modifying the connection strings just does not work. That was where we got the ODBC errors.
Stephen, thank you for the update. I will be looking forward to hearing what you see on the server log files.
Making some progress, its a permissions issue for sure, on the files themselves. I am trying to find what file is being called and ctually having to set up a test enviroment as filemon even with filtering is a bit hard to follow when I don’t know exactly which file is denied permissions, and the files are accessed so quickly in a shared environment it is not easy to trace down each file access even in a 3 second span, so I am working on a VPS to emulate what is happening.
Stephen, the site has been redeployed now. Please note that it appears that the server is trying to serve up the “index.html” file instead of the “default.aspx” by default. Not related to these issues, but something to note.
Just wanted to drop a note on this for everyone else. Thanks for Stephen’s efforts, the site is now working with ODBC. Great work Stephen! Definitely glad I chose this place for my hosting services.
the mysql data dll must be recompield to work, that is without a doubt, the only way to do without a recompile is with the odbc.net, it will work without problems and mysql forums suggest it for asp.net in medium trust.
I am working over the next 2 days to write up a tutorial on recompiling the mysql.data.dll as well.