I have downloaded the PnP sample project ECM.AutoTagging and have configured an azure service bus for debugging, have created new client id/token and updated the app manifest/web.config and so on. I can set breakpoints on library creation and the code to attach the event receiver is run. I check with PnP PowerShell that is has been added also:
$list = Get-PnPList -Identity AutoTaggingSampleItemAdded
Get-PnPEventReceiver -List $list
ReceiverName ReceiverId SequenceNumber EventType
------------ ---------- -------------- ---------
PnPAutoTaggingItemAdded b599481b-76e8-4159-8a82-a59b5b8f0f18 0 ItemAdded
but it's not firing when I'm creating a new document or uploading one to the library.
The code
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult _result = new SPRemoteEventResult();
try
{
switch(properties.EventType)
{
case SPRemoteEventType.ItemAdded:
HandleAutoTaggingItemAdded(properties);
break;
case SPRemoteEventType.ItemAdding:
HandleAutoTaggingItemAdding(properties, _result);
break;
}
_result.Status = SPRemoteEventServiceStatus.Continue;
}
catch(Exception)
{
//You should log here.
}
return _result;
}
Isn't being hit. I haven't changed any code from the example so I'm not sure what I could be missing? The code example is three years old so could how to do things have been updated since then?
Thanks in advance.