How do I determine which assembly is missing in Mono 2.10.2? - mysql

I have a web server with MONO 2.10.2 (fast-cgi) on a CentOS 6 box. Running a plain-vanilla MVC 3 site works great. However, when I add MySql.Data, it gives me a not-so-helpful error:
System.IO.FileLoadException: The assembly name is invalid.
My DLLs are in the right place. They're referenced properly. Everything has been done correctly, but Mono still complains that it can't find an assembly without telling me which one. The problem occurs after simply adding a reference to MySql.Data and without changing any code. I've looked through the MySql.Data source solution and the references that it needs seem to exist on the web server.
I understand other people have the same problem. I am happy to debug it myself, but I'm new to Mono and I can't figure out how to get a more-detailed error messages. I've checked Mono's site for instructions to enable more detailed logging, but their docs assume a certain base knowledge about Mono that I do not have.
Is there a way to get more detailed information when Mono fails to load an assembly?
I'm not sure if these details matter, but just in case...
- Mono: 2.10.2 (served via fastcgi-mono-server4)
- MySql: Connector.Net 6.4.4.0 (from the v4 set in the .Net & Mono download)
- Webserver: NGINX 1.0.11
- OS: CentOS 6

If you can get a "test case" that compiles to an application, try:
MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" mono my_app.exe
Or just temporarily edit your CGI script so that it sets those two variables. Check the logs - you should see what is not loaded propely.

Related

mySQL Data Provider .NET Core 2.0

Looking for help for some solutions on switching out the default data provider for the project from MS SQL to mySQL. Eventually with the intent of deploying the solution to Auruora on AWS.
After installing the nuget package I get something along the lines of :
System.TypeLoadException: Method 'Clone' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=6.10.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.
This lead me to believe that there is no .NET 2.0 Entity Framework Core extention that runs for MySQL. Do I have to rollback to a different version?
For EntityFrameworkCore, it's suggested to use Pomelo.EntityFrameworkCore.MySql.
You may refer to their Getting Started documentation.
A fellow member of the community has kindly summarised the essential steps here:
Put Pomelo.EntityFrameworkCore.MySql into the xxx.EntityFrameworkCore project's .csproj file (see step 2 in the Pomelo getting started guide)
In your xxxDbContextConfigurer class put builder.UseMySql(...) rather than builder.UseSqlServer(...)
Change the connection string found in the appsettings.json file in the xxx.Web.Host project

ASP.Net Could not load file or assembly MySql.Data

I have a ASP.Net website that connects to a MySQL data base to retrieve data. I have used NuGet to install mysql.data. Doing this added a Bin folder with the sql.data dll in it to my project. It added a reference in my web config file. and it added a packages.config to my project. All of this is expected i assume ? With these resources in place my website works when i run it from visual studio. The problem is when i upload it to a server i get the following error :
Server Error in '/' Application.
Configuration Error
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=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: d:\DZHosts\LocalUser\bman262\www.brandonsLoginTest.somee.com\riviera horticulture\web.config Line: 7
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' 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].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1
This is saying it cant find the mysql.data reference right ? What am i doing wrong ?
Here are some pictures of my solution in visual studio and my web.config
Solution
Web.config
I am tearing my hair out over this, any help would be VERY appreciated
→ You will have to make sure that the same version is installed on the server where you are deploying your project.
→ If the server to which you are deploying your project is on 64 bit, you can enable 32 bit support for this site's application pool, if your dll requires 32 bit architecture.
For anyone using similar or the same host as me if you have this problem the solution was to convert the project file to an application on the server.

I'm getting dozens of "Failed loading" errors in cgi_error_log daily - what do they mean?

I'm seeing dozens of entries, daily, in my cgi_error_log file like this:
20151214T183710: www.example/index.php
Failed loading /usr/local/lib/ioncube/ioncube_loader_lin_5.2.so: /usr/local/lib/ioncube/ioncube_loader_lin_5.2.so: wrong ELF class: ELFCLASS32
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so: /usr/local/Zend/lib/ZendExtensionManager.so: wrong ELF class: ELFCLASS32
I changed the URL in the error message because the site is not yet ready for the public and I don't want any links to the site or even text in posts like this laying around.
As the site is still in testing, these messages are coming from my accessing pages and all of the pages have loaded correctly.
What does this message mean? I have no clue other than that ioncube is some sort of PHP Encoder.
Could this have something to do with the 32bit version of ioncube being run on a 64bit system? I've found references to that sort of problem.
Did some more digging - could this be happening because the version of PHP on the server is not 5.2? Error about ioncube shows 4.2 in the file name.
The version I'm using on the server if 5.5. They have 5.3 and 5.6.
If they had 5.2 I'd give it a try but it is not available.
More digging - found this set in my php.ini file for all my sites.
[Zend]
zend_extension = /usr/local/lib/ioncube/ioncube_loader_lin_5.2.so
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.0
zend_optimizer.version=3.2.0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
So - do I need to install newer versions of one or more of the items listed above?
If so - where do I start and can I do it myself or does the hosting company staff have to do it?

Xcode Server Bot, ipatool error

We have an Xcode Server bot set up for CI for our project, using Xcode 7.1. It's set to produce an IPA. We only recently noticed, but a few weeks ago, it started giving this warning every build:
Bot Issue for CareConsult Bot (develop) (build service warning)
Assertion: exportArchive: ipatool failed with an exception:
File: (null):(null)
This prevents it from producing an IPA, which is a problem.
I've tried:
- Creating a new bot
- updating gems (saw a similar issue that was resolved this way)
Doing an archive & export on my local machine gives the same error if I choose to "Export for specific device". So the problem is not specific to the build server.
Any ideas?
My suspicion is that this has to do with enabling bit code, and the build bot is using the "compile from bitcode" option by default. I'm still digging into this, but figured I'd share what I have found thus far.

[FireDac][Phys][MySQL]-1101. Unsupported MySQL version [0]. Supported are client and server from v 3.20 to v6.2

Does anyone know how to solve this Error on RAD Studio XE6 Delphi
If you take the sample app supplied by Embarcadero
FireDAC\Samples\Comp Layer\TFDConnection\DLL_Sharing and change the FDConnection to use a MySQL server instead, you get this error.
[FireDac][Phys][MySQL]-1101. Unsupported MySQL version [0]. Supported are client and server from v 3.20 to v6.2.
The connection in the exe works, using the MySQL server, but the sharing in the DLL does not.
Even though the steps in the FireDAC DLL_Sharing are followed..
Copy the file FireDAC.Phys.MySQLWrapper.pas (from source\data\firedac directory) to your project directory, edit the file, and look for the following three lines:
if (FVersion < mvMySQL032000) or (FVersion >= mvMySQL060200) then
FDException(OwningObj, [S_FD_LPhys, S_FD_MySQLId], er_FD_MySQLBadVersion,
[FVersion]);
Remove them (or place them in comments), and rebuild your project. Make sure that it uses the FireDAC.Phys.MySQLWrapper from your project directory (you may have to close and re-open the project to ensure it uses your local unit).
That way, you still won't be able to connect at design-time, but at least it will work at runtime.
Groetjes, Bob Swart
Use the "original" mysql libmysql.dll and its work fine ;)
the mariadb's libmysql.dll causes this error