How to connect project Client 2010 application to project server 2010 in Visual C# RRS feed

  • Question

  • Hi,

    I´ve got the following error:

    System.Runtime.InteropServices.COMException was unhandled
      Message=The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

    If i made the application visible i can see on the Backstage menu that the application isn´t connected to the server. So how can i connect the app to the server??

    Code that i use:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using project = Microsoft.Office.Interop.MSProject;

    namespace WindowsFormsApplication2
     public partial class Form1 : Form
      public Form1()
      private void button1_Click(object sender, EventArgs e)
       project.ApplicationClass app = new project.ApplicationClass();
       app.Visible = true;
       app.FileOpenEx("<>\\GB_Ausstattung_ Inventar_ Geräte_ Werkze 2009_",false);
       app.FileCloseEx(project.PjSaveType.pjSave, true, true);

    Wednesday, November 10, 2010 3:00 PM