|
 |
asp_components thread: Error in creating MSProject object
Message #1 by pranot.mengle@b... on Tue, 15 Jan 2002 10:47:47 -0000
|
|
Hi all,
I need to generate Microsoft Project Plan through ASP. I have created a DLL
which takes some parameters and then creates the .mpp file using Microsoft
Project. The code is as follows.
ASP CODE
===================================
'generate projectplan
set obj = Server.CreateObject("MSProjectPlan.CreateProject")
err_no
obj.GenerateProjectPlan(917,1,"11/12/2001","E:\quacs_3.0_devl\projectplans\t
estplan.mpp", Err_Description)
Response.Write
"<br>err_no="&err_no&"|Err_Description="&Err_Description&"<br>"
set obj = nothing
===================================
In the above code, "MSProject.CreateProject" is the Prog ID of the DLL.
VB CODE
===================================
Dim oProjApp As MSProject.Application
Set oProjApp = CreateObject("MSProject.Application")
===================================
The VB code fails at the line
Set oProjApp = CreateObject("MSProject.Application")
The error printed in the log file is
"Activex cannot create object"
But the same VB code when run in the VB debug mode, generates the MPP file
correctly. Only when called from ASP, I get the error.
Can you help me resolving the error.
Thanks
Pranot
Message #2 by Kyle Burns <kburns@c...> on Wed, 16 Jan 2002 16:38:27 -0500
|
|
I haven't done anything with project, but most of the Office suite
applications are out of process components. This could be where your
problem lies because by default IIS does not allow the creation of out of
process components. This is kind of an obvious question, but is Project
installed on the server?
=================================
Kyle M. Burns, MCSD, MCT
ECommerce Technology Manager
Centra Credit Union
kburns@c...
>> -----Original Message-----
>> From: pranot.mengle@b... [mailto:pranot.mengle@b...]
>> Sent: Tuesday, January 15, 2002 5:48 AM
>> To: ASP components
>> Subject: [asp_components] Error in creating MSProject object
>>
>>
>> Hi all,
>>
>> I need to generate Microsoft Project Plan through ASP. I
>> have created a DLL
>> which takes some parameters and then creates the .mpp file
>> using Microsoft
>> Project. The code is as follows.
>>
>> ASP CODE
>> ===================================
>> 'generate projectplan
>> set obj = Server.CreateObject("MSProjectPlan.CreateProject")
>> err_no
>> obj.GenerateProjectPlan(917,1,"11/12/2001","E:\quacs_3.0_devl
>> \projectplans\t
>> estplan.mpp", Err_Description)
>> Response.Write
>> "<br>err_no="&err_no&"|Err_Description="&Err_Description&"<br>"
>> set obj = nothing
>> ===================================
>>
>> In the above code, "MSProject.CreateProject" is the Prog ID
>> of the DLL.
>>
>> VB CODE
>> ===================================
>> Dim oProjApp As MSProject.Application
>> Set oProjApp = CreateObject("MSProject.Application")
>> ===================================
>>
>> The VB code fails at the line
>>
>> Set oProjApp = CreateObject("MSProject.Application")
>>
>> The error printed in the log file is
>> "Activex cannot create object"
>>
>> But the same VB code when run in the VB debug mode,
>> generates the MPP file
>> correctly. Only when called from ASP, I get the error.
>> Can you help me resolving the error.
>>
>> Thanks
>> Pranot
>>
>>
>>
>>
>>
>>
>> $subst('Email.Unsub')
>>
>> $subst('Email.Unsub').
>>
Message #3 by "John Wm. Wicks" <j_wicks@p...> on Thu, 17 Jan 2002 16:20:21 -0800
|
|
Hello Kyle/Pranot,
ASP components digest wrote:
>Subject: RE: Error in creating MSProject object
>From: Kyle Burns <kburns@c...>
>Date: Wed, 16 Jan 2002 16:38:27 -0500
>X-Message-Number: 1
>
>I haven't done anything with project, but most of the Office suite
>applications are out of process components. This could be where your
>problem lies because by default IIS does not allow the creation of out of
>process components. This is kind of an obvious question, but is Project
>installed on the server?
>
>'generate projectplan
>set obj = Server.CreateObject("MSProjectPlan.CreateProject")
>err_no
>
>Set oProjApp = CreateObject("MSProject.Application")
>
>The error printed in the log file is
>"Activex cannot create object"
>
Pranot there is a difference between Server.CreateObject and
CreateObject. CreateObject trys to activate the ActiveX Object on your
local machine not on the server. Are you working with MSProject Central
or just Project installed on the Server with IIS ??
John
|
|
 |