none
Com class factory for c RRS feed

  • Question

  • This is regarding COM class error, Today I created a new test project, just put the  one line in code  

             -----Namespace used-----------      

                using Microsoft.Office.Interop.MSProject;

           ----Created an Object---------

     

                Microsoft.Office.Interop.MSProject.Application pjApplication = new Microsoft.Office.Interop.MSProject.Application();

     

          ----Added Reference------------

     

          And added the referrence Microsoft Project 12.0 Object Library through COM tab.

     

     

          It is showing  the same error. Though I have set all the permissions in Component Services. Kindly help me in this this error comes after making the virtual directory, locally it is working fine.

    • Moved by Andrew.Wu Friday, April 8, 2011 1:43 AM (From:.NET Framework Setup)
    Thursday, April 7, 2011 4:32 AM

Answers

  • Hi Vini,

    After reading your post, I knew your problem. It seems that you publish your project to the IIS which is a server-side automation of Office. Unforunately, Microsoft does not recommend server-side automation for Office. Please check this KB article:http://support.microsoft.com/kb/257757

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    I hope this can help you and thank you for your understanding.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Bruce Song Monday, April 18, 2011 12:21 PM
    Monday, April 11, 2011 11:28 AM