Sunday 15 July 2012

c# - MATLAB dll integration with asp.net website in 64 bit machine giving exception -


I have a problem: I have created a function in Matlab that I asp.net .
This is working fine on a 32-bit machine, but when I'm working on it on a 64-bit machine, it transmits it.

Matlab-dll integration with a 64-bit machine on the asp.net website gives an exception, but at 32-bit No machine.

Background

I am trying to learn how to integrate the matlab code in C #. I am using Matlab R2010a and Visual Studio 2010. I downloaded and executed the Matlab portion of the code.

However, when I tried to compile the C # code in Visual Studio, I found the following error:

The file or the assembly could not be loaded 'MWArray One version of version = 2.9 1.0, culture = neutral, public token = e1d84a0da19db86f 'or its dependency failed to detect the specified file.

A quick Google search led me, who instructed me to change x86 to the target processor.

However, as soon as I did, I found a new error:

System.BadImageFormatException was unchecked

message = "not loaded One of the file or assembly 'megaarere, version = 2.0.0.0, culture = neutral, public key token = E1D 84AD19BbFFF' or its dependency. To load a program with wrong format Was tried. "

My MetLab version is 64 bit but I still have this problem Received'm experiencing. Is there any workaround?

Try to use it

Applications created from C # are managed Code is compiled as, which makes them platform independent (like Java, for example), when you compile the C # application on a 32-bit machine and then deploy it on a 64-bit machine , Then it will try to run as a 64-bit application by default. After that, it will try to find the 64-bit version of MWArray.dll, and if this fails, the error mentioned will be displayed.

To resolve this problem, set the option "Properties -> and GT"; Build "X86" instead of "any CPU" before compiling your C # application - & gt; ; Platform goal "This will impact the application on 64-bit machines in 32-bit mode.

No comments:

Post a Comment