PSI - Project Server 2007 - GeneralSessionInvalid error Options

N

nilgiris

I keep getting GeneralSessionInvalid error, I did some searches, but
did not get much info on this error, this error occours when I invoke

"QueueUpdateProject". Any help will be appreciated.


Complete error message


=================


Error: System.Web.Services.Protocols.SoapException:
ProjectServerError(s) LastError=GeneralSessionInvalid Instructions:
Pass this into PSClientError constructor to access all error
information at
Microsoft.Office.Project.Server.WebService.Project.QueueUpdateProject(Guid
jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean
validateOnly)


PSCLientError Output: GeneralSessionInvalid


Code


============


ProjectWebSvc.Project project = new
WindowsApplication1.ProjectWebSvc.Project();


project.Credentials = new NetworkCredential("myusername",
"mypassword");


ProjectWebSvc.ProjectDataSet ProjectList = project.ReadProject(new
System.Guid("741d129a-43f4-47a6-9cfc-1fc1f02c2bff"),
ProjectWebSvc.DataStoreEnum.WorkingStore);


foreach (ProjectWebSvc.ProjectDataSet.TaskRow t in ProjectList.Task)


{


if (!t.IsNull("Task_name"))


{


t.TASK_NAME = "Test --" + t.TASK_NAME.ToString();


//t.AcceptChanges();



}
}


//ProjectList.AcceptChanges();

//ProjectList.Project.AcceptChanges();


Guid sessionId = Guid.NewGuid();


Guid jobId = Guid.NewGuid();


project.CheckOutProject(new
System.Guid("741d129a-43f4-47a6-9cfc-1fc1f02c2bff"), Guid.NewGuid(),
"PSI Checkout...");


project.QueueUpdateProject(jobId, sessionId, ProjectList, false);
 
C

Chris Boyd

From looking at your code, you have to make a small change. You have to use
the same session ID for all your calls into the Project PSI for that checkout:


Guid sessionId = Guid.NewGuid();


Guid jobId = Guid.NewGuid();


project.CheckOutProject(new
System.Guid("741d129a-43f4-47a6-9cfc-1fc1f02c2bff"), sessionUid,
"PSI Checkout...");


project.QueueUpdateProject(jobId, sessionId, ProjectList, false);

--
Chris Boyd
MS Project
Program Manager

Blog: http://blogs.msdn.com/project_programmability/
 
R

Ram

From looking at your code, you have to make a small change. You have to use
the same session ID for all your calls into the Project PSI for that checkout:

Guid sessionId = Guid.NewGuid();

Guid jobId = Guid.NewGuid();

project.CheckOutProject(new
System.Guid("741d129a-43f4-47a6-9cfc-1fc1f02c2bff"), sessionUid,
"PSI Checkout...");

project.QueueUpdateProject(jobId, sessionId, ProjectList, false);

--
Chris Boyd
MS Project
Program Manager

Blog:http://blogs.msdn.com/project_programmability/














- Show quoted text -

Thanks Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top