Why do I receive an "Unspecified error" for my ASP.NET application that calls a MATLAB Builder for COM/.NET component?

1 view (last 30 days)
I have created a COM/.NET component using MATLAB Builder for COM/.NET to generate a MATLAB figure for my ASP.NET application. I followed the example described in Solution 1-2EETRY listed below, and I notice that when I call my COM/.NET component multiple times from my ASP.NET application, I observe the following error:
Unspecified error
instead of a MATLAB plot. This error may happen sporadically and is not always reproducible.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The cause of this error is rooted in the way that ASP.NET applications do garbage collection. In order to resolve this error, be sure to insert:
close all force;
as the last line of code for the M-function that you are compiling into a COM/.NET component.

More Answers (0)

Categories

Find more on MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!