gpt4 book ai didi

asp.net - IIS 7.5 上的 MATLAB Builder NE 崩溃应用程序池

转载 作者:行者123 更新时间:2023-12-04 06:52:24 26 4
gpt4 key购买 nike

我正在使用 ASP.NET 为 MATLAB 函数开发 Web 用户界面。我已经开始研究演示并遇到了这样的问题。

我使用 MATLAB 2010a 中的 deploytool 创建了一个 MyComponent.dll 程序集,目标框架 - 3.5。这个组件有一个函数 GetKnot() 返回一个数字。

function df = getKnot()
f = figure('Visible', 'off');
knot;
df = webfigure(f);
close(f);
end

然后我在visual studio 2008 sp1中做了一个简单的webapp,只有一页Default.aspx。
我添加了对 MWArray.dll、WebFiguresService.dll 和 MyComponent.dll 的引用。
后面的代码是:
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();
}
}
}

当我在 Visual Studio 的开发 Web 服务器上运行此页面时 - 一切正常,图有效。

但是,当我尝试在运行在 Win7 x32 上的本地 iis 7.5 上部署 webfigure 时,iis 应用程序池崩溃了。系统事件日志中有一个条目“服务应用程序池‘Classic .NET AppPool’的进程与 Windows 进程激活服务发生致命的通信错误。进程 ID 为‘3676’。数据字段包含错误号 6D000780”。当 MyComponent 正在实例化时会发生这种情况。

转移到 IIS 后我会忘记什么?

其他例子,如幻方控制台应用程序,运行完美,每个matlab组件都实例化,但不是在IIS环境中。

编辑:我使用 Windows 7 和 MATLAB 2009b 部署了一个虚拟机,并尝试了相同的示例。一切正常。 :(。也许是 MATLAB 2010 的问题?

最佳答案

我遇到了这个完全相同的问题(MCR 使 Windows Server 2008 中的 AppPools 崩溃)。这似乎是 MCR 和 IIS 7 之间的问题。联系 Mathworks 支持后,他们告诉我这是由 MCR 中的错​​误引起的(与“NetworkService”AppPool 身份的权限有关)。我收到以下建议:

To work around the issue, you could use either of the following 2 steps:

  1. Create an environment variable named MATLAB_PREFDIR and let it point to a directory where NETWORK SERVICE has write access. Or,

  2. Create a new Application Pool which runs under the "LocalSystem" Identity (look under "Advanced Settings..." of the Application Pool). Then configure your Application to use this Application Pool ("Basic Settings..." of your Application).


我应用了第二个建议,它解决了我的问题。我希望这对遇到相同问题的其他人有所帮助。

关于asp.net - IIS 7.5 上的 MATLAB Builder NE 崩溃应用程序池,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2940791/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com