From MATLAB to ASP.NET Web Forms Application/Web deployment - How to solve 'System.TypeInitializationException' error?
Afficher commentaires plus anciens
I'm trying to get a simple addition function performed within MATLAB to work on a webpage with an ASP.NET Web Forms application, purely to see if the process works.
1. I use the Library Compiler to build the 'addNumbers.dll' along with the class 'AdditionClass' to instantiate .
2. Reference the 'addNumbers.dll' along with the 'MWArray.dll' in the the C#.
3. Run the web application, but a 'System.TypeInitializationException' in App_Web_XXX.dll errors occurs once the button to perform the addition is pressed.
MATLAB R2015a, x64 Windows 10. Changing the debug configuration to x64 within VS does not seem to solve it. Any help would be greatly appreciated.


'Add' button results in exception error and breaks.

Exception Detail: System.BadImageFormatException


Oddly enough, it does work with pretty much the exact same C# code and same .dll paths, except in a Windows Forms Application rather than a Web Form. This at least proves the correct .dll files are being referenced and the code is correct (presumably).

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deploy to .NET Applications Using MWArray API dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!