Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / November 2005

Tip: Looking for answers? Try searching our database.

MSProject Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mohamed Zied Nouira - 16 Nov 2005 09:39 GMT
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
Dmytro Lapshyn [MVP] - 17 Nov 2005 07:12 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.