ReadStatusForResource
-
Monday, April 30, 2012 12:23 AM
This code works on one of my development environments, but not the other!
I get a Access denied error when calling the ReadStatusForResource method...
SvcResource.ResourceClient resourceClient = new SvcResource.ResourceClient();
Guid resUID = resourceClient.GetCurrentUserUid();
SvcStatusing.StatusingClient statusClient = new SvcStatusing.StatusingClient();
DateTime min = DateTime.Today;
DateTime max = DateTime.Today.AddMonths(6);SvcStatusing.StatusingDataSet ds = statusClient.ReadStatusForResource(resUID, Guid.Empty, min, max);
Any ideas?
All Replies
-
Monday, April 30, 2012 6:49 AM
Hi there--
As per rule, the method ReadStatusForResource gets statusing data for the specified assignment or for all assignments of the specified resource. Does not require impersonation of the resource. In your development environments , you might be calling with default user who may be administartor/higher permissions. The PSI call maker should be having the StatusBrokerPermission which allows a user to read and submit status on behalf of another resource.
http://msdn.microsoft.com/en-us/library/microsoft.office.project.server.library.pssecurityglobalpermission.statusbrokerpermission_di_pj14mref.aspx
http://technet.microsoft.com/en-us/library/cc197631.aspxDoes that help?
Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
- Marked As Answer by BayouB Monday, April 30, 2012 10:26 AM
-
Monday, April 30, 2012 10:26 AMThank you Amit!
-
Monday, April 30, 2012 10:39 AMYou are welcome :)
Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

