none
Server side events messages RRS feed

  • Question

  • Hello,

    Im developing a server side event handler to validate projects publishing. It is possible to show a MessageBox to user?

    Or how can I inform user what he did wrong (I dont want to use EventLog)?

    I tried to use ProjectPrePublishEventArgs.CancelReason, but what is this doing? I didnt noticed any notification with my message...

    Here is my piece of code:
    public
    
     override
    
     void
    
     OnPublishing(PSContextInfo contextInfo, ProjectPrePublishEventArgs e)
     {
      string
    
     validationResult = ValidateProjectNumber(e.ProjectGuid);
      if
    
    (!string
    
    .IsNullOrEmpty(validationResult))
      {
      //CreateLogEntry(validationResult,EventLogEntryType.FailureAudit);
    
    
      e.Cancel = true
    
    ;
      e.CancelReason = validationResult;
      //e.CancelEvent(validationResult);
    
    
      }  
     }
    



    Thanks for all help

    Ah and last question about "When the PSI will Do" ;):

    (copied from SDK Documentation)

    Master Projects and Cross-Project Links

    Wednesday, December 15, 2010 9:26 AM