I'm developing a web user interface for MATLAB functions with ASP.NET. I've started with studying demos and stucked with such problem.
I created a MyComponent.dll assembly with deploytool from MATLAB 2010a, target framework - 3.5. This component has one function GetKnot() which returns a figure.
function df = getKnot()
f = figure('Visible', 'off');
knot;
df = webfigure(f);
close(f);
end
Then I made simple webapp in visual studio 2008 sp1, with only one page Default.aspx. I added references to MWArray.dll, WebFiguresService.dll and MyComponent.dll. The codeBehind is:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyComponent;
using MathWorks.MATLAB.NET.WebFigures;
namespace MATLAB_WebApplication
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var myComponentClass = new MyComponentClass();
var x = myComponentClass.getKnot();
WebFigureControl1.WebFigure = new WebFigure();
}
}
}
When I run this page on Visual Studio`s Development web server - everything is fine, figure works.
But when I`m trying to deploy webfigure on my local iis 7.5 which runs on Win7 x32 - iis app pool crashes. There is an entry in System Event Log "A process serving application pool 'Classic .NET AppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '3676'. The data field contains the error number 6D000780". This happens when MyComponent is instantiating.
What I could forget when moved to IIS?
Other examples, like magic square console application, runs perfect, and every matlab component instantiating, but not in IIS environment.
Edit: I deployed a virtual machine with Windows 7 and MATLAB 2009b, and tried the same example. Everything works fine. :(. Maybe it`s MATLAB 2010 issue?