문제

$web = Get-SPWeb "http://----/PWA/Test Project/"
$list = $web.Lists["Risks"]
$list.EventReceivers
.

3 개의 사건을 보여줍니다.itemAdded, itemDeleted, itemUpdated.아래는 그 중 하나의 예가 그곳에 표시됩니다.

Id                          : xxxxx-96a1-4e1c-acbd-c98cd8d16e19
Name                        : ItemAddedEventReceiver
SiteId                      : xxxxx-a858-443f-8159-6a6e33758693
WebId                       : xxxx-f09b-4f3a-be28-1d5f6a158ac1
HostId                      : xxxxx-1d5a-4e5c-8fa9-d3615d33b315
HostType                    : List
ParentHostId                : 00000000-0000-0000-0000-000000000000
ParentHostType              : Site
Synchronization             : Asynchronous
Type                        : ItemAdded
SequenceNumber              : 4000
Assembly                    : Microsoft.Office.Project.Server.PWA,Version=14.0.
                              0.0,Culture=neutral,PublicKeyToken=71e9bce111e942
                              9c
Class                       : Microsoft.Office.Project.PWA.WSSEventReceivers.PS
                              DBUpdater
Data                        :
Filter                      :
Credential                  : 0
ContextItemId               : 0
ContextItemUrl              :
ContextType                 : 00000000-0000-0000-0000-000000000000
ContextEventType            : 00000000-0000-0000-0000-000000000000
ContextId                   : 00000000-0000-0000-0000-000000000000
ContextObjectId             : 00000000-0000-0000-0000-000000000000
ContextCollectionId         : 00000000-0000-0000-0000-000000000000
UpgradedPersistedProperties :
.

디버그 모드로 실행되는 경우 중단 점은 히트를 히지 않습니다 (자동 활성화, 중단 점 설정, 배포, 활성화 된 기능, 추가 및 삭제 시도 시도).

   public override void ItemAdded(SPItemEventProperties properties)
   {
       MailMessage mailMessage = new MailMessage();
       mailMessage.Bcc.Add(new MailAddress(".@.com"));
       mailMessage.From = new MailAddress(".@.com");
       mailMessage.Subject = "Boom Risk";
       mailMessage.Body = "test body";

       var smtpClient = new SmtpClient
       {
           Host = "smtp.hhhhh.com",
           Port = 25,
           Credentials = new NetworkCredential
               ("", "")
       };

       smtpClient.Send(mailMessage);

       base.ItemAdded(properties);
   }
.

코드입니다.

누구든지 작동하지 않을 수 있는지 제안 할 수 있습니까?

감사합니다

도움이 되었습니까?

해결책

Well after all that....

As I am on Project Server I had been deploying to the PWA. Turns out I have to deploy to every individual Project Site. Once I deployed to one of these it worked!

Hoorah.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top