When are server-side events supposed to fire?


We have had a few questions on events, and the fact that sometimes, or more correctly, in some circumstances, they don't fire.  So if you are using the PSI to make things happen then all should work and usually the description gives you a good idea when they will fire.  However, you might also expect that doing a similar thing through Project Professional or Project Web Access will fire the same event.  In many cases this is true - a publish is a publish is a publish and wherever you publish a project from will fire the "publish" events.  However in saving from Project Professional after deleting some entity in the project you will not see the "EntitiesDeleted" event fire - that would get triggered by a PSI action doing the same thing.  Project Professional and PWA make use of the same PSI web services in many cases, but also have a private winproj web service  and pwa web service.  It is when using these "private" web services that event behavior may be different. 

Give us feedback if you are missing some events that as an ISV would make your integration to Project Server easier. 

The SDK should be going through another revision later this month and we will be updating the event area to give a little more information..

Technorati Tags: Project Server 2007

Comments (14)

  1. /pd says:

    Any idea what this error means ??

    System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=ProjectPublishEnqueueFailure Instructions: Pass this into PSClientError constructor to access all error information

      at Microsoft.Office.Project.Server.WebService.Project.QueuePublish(Guid jobUid, Guid projectUid, Boolean fullPublish, String WssURL)

  2. Looks like the queue is unhappy with the data it has to publish.  The ULS logs may have more information or the inner error may give more detail.  Having some context of when it occured might help too.

  3. Martijn Veldkamp says:

    Hi Brian,

    As an ISV trying to extend the default behaviour of Project Server I would love to have more knowledge about when which event will fire and when it contains what data. For example TimeSheet.OnCreating/ed contains only the headers and no lines etc.

    Thanx,

    Martijn

  4. Hi Martijn,

    We have heard this request and will try and get a little more detail in place for when events should be expected to fire as we revise the SDK in the future.  In many cases the payload of the event is limited for performance reasons – but should contain enough information to be able to use another call to get to what you need.

    Best regards,

    Brian.

  5. Shreenivas says:

    Hi Brian,

    I have created a server side event handler (for Project Created). I seems to work ok on Dev environment, but in production it doesnt seem to fire at all (I have put some debug messages to log in eventviewer). What can I check to make sure it is firing? Is there any settings that I have to check?

    Thanks,

    Shreenivas

  6. Shreenivas says:

    Got it. The Microsoft Project Server Event Service in Windows services was not started!. Was turned off by admin.

  7. RoyG says:

    Hi Brian,

    I have a similar problem to Shreenivas’s only the production environment onwhich the event handler is installed, is spread on 3 different machines. The event handler works great on a single server but not with this sort of architecture. I have installed it on the machine holding the “” and made sure it’s up and running.

    Any thoughts?

    Thanks,

    Roy G

  8. RoyG says:

    Sorry,

    the name of the service is ofcourse – "Microsoft Office Project Server Events Service" and not ""

    Roy G

  9. Hi Roy,

    I haven’t seen this issue.  Are there any clues in the logs? (App or ULS). It must be completely missing it as if the code fails then the specific process firing the event will normally fail too.  I saw your newsgroup posting and if I had a better answer I would have posted it there.  If this isn’t a production server you could try debugging and attach to the event service process – but this will probably just confirm that the code isn’t getting triggered. You probably have already but check that it registered OK and is showing up in the UI.  ProjTool (from the SDK) also has a way to view registered event handlers.

    Best regards,

    Brian.

  10. Ajay says:

    On development machine, using the Project server Security PSI I am able to add newly created resources to Team Members security group whereas on another machine having same project server configuration it is failed.

    It gives error messages as follows:

    Message:System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=SecurityInvalidUserUidRef Instructions: Pass this into PSClientError constructor to access all error information at Microsoft.Office.Project.Server.WebService.Security.SetGroups(SecurityGroupsDataSet group)

    Thanks in advance.

  11. Alex M says:

    I am getting the following attempting to load default.aspx /pwa (with CustomErrors=Off in web.config):

    System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralUnhandledException Instructions: Pass this into PSClientError constructor to access all error information

     at Microsoft.Office.Project.Server.WebService.PWA.AdminGetAllRemindersCount()

    nothing much in the ULS or App Event Logs? Any experience with this? This is a dev box, with farm info as follows:

    Version: 12.0.0.6520 (SP2 w/Oct. 09 CUs)

    Get this just after provisioning successfully, attempting a first-time login.

  12. MyLbm says:

    Please, help. The same error:

    Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralUnhandledException Instructions: Pass this into PSClientError constructor to access all error information

     at Microsoft.Office.Project.Server.WebService.PWA.AdminGetAllRemindersCount()

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

    Stack Trace:

    [SoapException: System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralUnhandledException Instructions: Pass this into PSClientError constructor to access all error information

      at Microsoft.Office.Project.Server.WebService.PWA.AdminGetAllRemindersCount()]

      Microsoft.Office.Project.Server.WebServiceProxy.PSIProxyBase.InvokePSI(String serviceName, String methodName, Object[] parameters) +186

      Microsoft.Office.Project.Server.WebServiceProxy.PWA.AdminGetAllRemindersCount() +147

      Microsoft.Office.Project.PWA.WebParts.RemindersPart.GetAllRemindersCount() +288

      Microsoft.Office.Project.PWA.WebParts.RemindersPart.GetReminderCount(ReminderType reminderType) +49

      Microsoft.Office.Project.PWA.WebParts.RemindersPart.GetTasksReminders() +866

      Microsoft.Office.Project.PWA.WebParts.RemindersPart.PopulateReminders() +29

      Microsoft.Office.Project.PWA.WebParts.RemindersPart.CreateChildControls() +71

      System.Web.UI.Control.EnsureChildControls() +87

      System.Web.UI.Control.PreRenderRecursiveInternal() +44

      System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +42

      System.Web.UI.Control.PreRenderRecursiveInternal() +171

      System.Web.UI.Control.PreRenderRecursiveInternal() +171

      System.Web.UI.Control.PreRenderRecursiveInternal() +171

      System.Web.UI.Control.PreRenderRecursiveInternal() +171

      System.Web.UI.Control.PreRenderRecursiveInternal() +171

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

  13. Hi MyLbm (and Alex if you haven't resolved this yet) – their can be several reasons for this issue and I'd suggest opening a support incident.  Most likely a permisions issue with the web part not able to succesfully access the data it needs for the reminders.

    Have you followed all instructions for the permisisons neded for all accounts?

    Best regards,

    Brian.

  14. MyLbm says:

    Thank you, Brian, for your reply.

    We are still living with this problem 🙁

    Tell us, pls, what the policy instructions we have to check? For the experiment I deleted all accounts, except "Farm Administrator" and… with no luck 🙁 the same error with Reminders webpart.

Skip to main content