简体   繁体   中英

matlab script not working on IIS

I am using Visual Studio 2015 , Matlab 2015Ra , IIS Windows 10 , .Net Framework 4.5.2. Matlab 2015Ra , IIS , Visual Studio 2015 are 64 bit on Windows 10 64 bit. I have matlab script compiled as net assembly or .dll. When i use development server which mean built in server on visual studio, the program works fine without error, meanwhile i deployed on IIS , the program fails to execute matlab code with this screenshot error message. enter image description here

Error :

The MATLAB runtime instance could not be initialized
segv - SEVERE ERROR

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ApplicationException: The MATLAB runtime instance could not be initialized
segv - SEVERE ERROR

Complete stack trace :

[ApplicationException: The MATLAB runtime instance could not be initialized
segv - SEVERE ERROR]
   MathWorks.MATLAB.NET.Utility.MWMCR..ctor(String componentId, String componentPath, Stream embeddedCtfStream, Boolean isLibrary) +282

[Exception: The MATLAB runtime instance could not be initialized]
   MathWorks.MATLAB.NET.Utility.MWMCR..ctor(String componentId, String componentPath, Stream embeddedCtfStream, Boolean isLibrary) +736
   get_matrix_svd.matrix_svd..cctor() +375

[Exception: MWArray assembly failed to be initialized]
   get_matrix_svd.matrix_svd..ctor() +43
   sistem_elearning.LatentSemanticAnalysisScore.execute() in C:\tugas\sistem_elearning\sistem_elearning\LatentSemanticAnalysisScore.cs:199
   sistem_elearning.takeexam.btnSubmit_Click(Object sender, EventArgs e) in C:\tugas\sistem_elearning\sistem_elearning\takeexam.aspx.cs:139
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11802037
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1735

someone help me why this errors happened, i frustated for looking this error, thank you so much, your favor must be appreciated.

I have two suggestions:

1) Check that the server OS and IIS version is also 64-bit like your VS 2015.

2) Check that the MATLAB Compiler Runtime ('MCR') is installed (must be same version as your MATLAB).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM