Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Industries Academia Support User Community Company
spacer spacer spacer spacer spacer spacer

Technical Solutions

Why is my ASP application unable to start MATLAB 7.6 (R2008a) as a COM Automation server?


Date Last Modified: Friday, June 26, 2009
Solution ID:   1-6FQK77
Product:   MATLAB
Reported in Release:   R2008a
Platform:   Windows
Operating System:   Windows Any
 

Subject:

Why is my ASP application unable to start MATLAB 7.6 (R2008a) as a COM Automation server?

Problem Description:

I receive an error when I try to use MATLAB as an Automation server from my ASP code.

The VB Code inside my ASP application:

Dim Matlab As MLApp.MLApp
Matlab = New MLApp.MLApp
Matlab.Execute("plot([0 18], [7 23])")
Matlab.Execute("enableservice('automationserver',true)")

I receive the following error:
Page_Error
Retrieving the COM class factory for component with CLSID
{491B6189-7E9D-43F4-A7DE-C062DF7B326E} failed due to the following
error: 80070005

Solution:

Ensure that MATLAB can be started as a COM Automation server by first executing the following from within a MATLAB session:

>>h = actxserver('Matlab.Application')

h =

COM.Matlab_Application

>> h.Execute('plot(1:10)')

This should display a linear plot obtained from the COM Automation server. If this fails, please ensure that MATLAB is registered by executing the following at the MATLAB command window.

>>!matlab /regserver
This process would register MATLAB as a COM server and also bring up a new session of MATLAB which you could then safely exit.

Once the above is successful, the ASPNET account should be given access to invoke MATLAB. This can be achieved by:

1. Open DCOMCNFG from the command prompt
2. Click on Component Services, expand to Computers/My Computer/DCOM Config.
3. Right click on Matlab.Application (The version number may appear within () as (Version 7.6)
4. Choose properties
5. Click on the Security Tab
6. Please choose the Customize radio button, then click on the Edit button
7. Please add access to the ASPNET account

You might have to restart the machine for these settings to take effect.

Please provide feedback to help us improve this Solution
Contact support
E-mail this page
Print this page