2147417851: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) using FileOpenEx

Întrebare 2147417851: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) using FileOpenEx

  • 15 mai 2012 03:44
     
     

    Hi,

    I am getting an error while opening a .mpp file thru VB.NET Code. I have added MSPROJECT reference.

    When i try to open the .mpp from local direcory, its working fine, but when i try to open the .mpp from a remote location like \\machine1\directory1\subdirectory2\*.mpp , its throwing an exception.

    We are using Project 2007 and Visual Studio 2005.

    Below is code which we have used.

    Dim pjApplication As New Microsoft.Office.Interop.MSProject.Application
    Dim mTasks As Microsoft.Office.Interop.MSProject.Tasks
    Dim mTask As Microsoft.Office.Interop.MSProject.Task

    pjApplication.FileOpenEx(sProjectFolder & sPROG_FILE, ReadOnly:=True, DoNotLoadFromEnterprise:=True)

    mTasks = pjApplication.ActiveProject.Tasks

    Error Messgae: 2147417851: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))