Hi,
Sorry not a complete answer, but an idea: "interop.msproject" is not a ProgID. That is, if your code looks like this:
Activator.CreateInstanceFromProgID("interop.msproject");
This won't work.
Either way, can you please:
a) Post the COM creation code
b) Translate the error message to English

Signature
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
Im trying to use the MSProject COM "interop.msproject" but when i
create a new object ihave this Error :
System.Runtime.InteropServices.COMException: Échec de l'exécution du
serveur
thanks
Mohamed Zied Nouira - 17 Nov 2005 07:36 GMT
Hello Dmytro,
thanks for your help.
First the Error is :
System.Runtime.InteropServices.COMException: Server Execution Failed
My code is :
public class MSPprop
{
public MSProject.ApplicationClass App;
public MSPprop()
{
*Error Here* App=new MSProject.ApplicationClass();
Proj=App.ActiveProject;
}
I added the reference of "interop.msproject".
I added also all the permission to "ASP_NET" in the DCOMCNFG but it
doesnt work...
Just last think i work on Windows XP.
Thanks.
Mohamed Zied Nouira - 22 Nov 2005 09:08 GMT
Hello,
my problem is solved.
i just add this code line and it works
public class MsProjectImport
{
public MSProject.ApplicationClass application;
---> [PermissionSetAttribute(SecurityAction.Demand, Name =
"FullTrust")]
public MsProjectImport()
{
application = new MSProject.ApplicationClass();
project = application.ActiveProject;
}
.....
just a last thing besure to close the MsProject File if u opened it
with "FileQuit" method.