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 Reply
  • Some more information:
    I found out, that same problem occurs with Studio 2011 also , where we didn't use GroupShare and GroupShareAPI. At the moment both processes (Studio 2011 and Studio 2017) are running, so %temp% fills faster of course.

    I was not right, when I said "anything else is running well" at the beginning of this thread. OpenProject in Studio 2017 is only one effect. Also AutomaticTasks don't run properly anymore if %temp% is "full".
    I found two lines in my code where I used Path.GetTempFileName and where I didn't delete this temp file after this call. But in my case it was one file per project.

    In my case this happend when calling Path.GetTempFileName and I need another file extension. Something like that:

    var tempFile = Path.GetTempFileName() ; //creates tmpAAAA.tmp
    tempFile = tempFile + ".html";
    //create html file again
    File.Delete(tempFile)
    tmpAAAA.tmp is not deleted in this case.

    Perhaps this helps
Children