PSI - Project Server 2007 - GeneralSessionInvalid error

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);
 
S

Sharry Heberer [MSFT]

The session ID with which you check out the project must be the same in all
calls you make during that session. Once you checkout a project, make sure
you are using the same session ID until you check the project back in.
 
R

Ram

The session ID with which you check out the project must be the same in all
calls you make during that session. Once you checkout a project, make sure
you are using the same session ID until you check the project back in.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Use of included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm















- Show quoted text -

That was it!
Thanks Sharry.
 
R

Ram

That was it!
Thanks Sharry.- Hide quoted text -

- Show quoted text -

Sharry and others, I tried your solution, it works perfectly...ie.
If I checkout the project using the PSI code, I have a valid session,
but if the user checks out the project using project pro, could you
please let me know how I can get the session ID of the project to
update the project.
Thanks
 

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