ProjectServer.OpenProject fails in Taskscheduler

Hi,

while running my Trados app by double click, app works as expected. 

But as soon as I put this task to Windows Task-Scheduler, ProjectServer.OpenProject raises an Exception:

Code:

var tradosProjectServer = new Sdl.ProjectAutomation.FileBased.ProjectServer(this.Host, false, this.UserName, this.Password);
string projectId = myProjectId;
var project = tradosProjectServer.OpenProject(new Guid(projectId), workFolder);

Exception:

There was an error opening the server project
   at Sdl.ProjectAutomation.FileBased.ProjectServer.OpenProject(Guid projectId, String localProjectFolder)

While any other things like working with local projects work as expected, here app fails.

Is there an issue with this function, when process is running without UI?

 

Credentials: checked

 

Thoughts? Thanks

Markus

Parents
  • Hi  

    I have not been able to reproduce the issue that you signalled above.  Please confirm that the steps I followed correspond to yours, to rule out that I missed something, as follows:

    Steps

    1. Open your console solution in Visual Studio as Administrator
      Note: the solution is simply a connection to the project server + open a project
      Example:
      • var server = new Sdl.ProjectAutomation.FileBased.ProjectServer(host, false, user, password);
      • var project = server.OpenProject(new Guid(projectId), workFolder);
    2. Set the output path of the solution to the Studio5 installation directory
    3. Compile + close the solution.
    4. Create a new Task from the windows Task Scheduler
      • Security: I used my windows user credentials (already logged in)
      • From the actions tab, select the new executable file that was built in the studio installation directory.
      • From the triggers, indicate the conditions that will trigger the task. I simply chose to run once at a specific time.
      • All other settings are default
    5. Click 'OK' to save the Task.

     I wonder is the issue related to security; possibly select the option 'Run with hightes privileges'?

Reply
  • Hi  

    I have not been able to reproduce the issue that you signalled above.  Please confirm that the steps I followed correspond to yours, to rule out that I missed something, as follows:

    Steps

    1. Open your console solution in Visual Studio as Administrator
      Note: the solution is simply a connection to the project server + open a project
      Example:
      • var server = new Sdl.ProjectAutomation.FileBased.ProjectServer(host, false, user, password);
      • var project = server.OpenProject(new Guid(projectId), workFolder);
    2. Set the output path of the solution to the Studio5 installation directory
    3. Compile + close the solution.
    4. Create a new Task from the windows Task Scheduler
      • Security: I used my windows user credentials (already logged in)
      • From the actions tab, select the new executable file that was built in the studio installation directory.
      • From the triggers, indicate the conditions that will trigger the task. I simply chose to run once at a specific time.
      • All other settings are default
    5. Click 'OK' to save the Task.

     I wonder is the issue related to security; possibly select the option 'Run with hightes privileges'?

Children