Debug ItemAdding and ItemUpdating Remove Event Receiver
-
08-02-2021 - |
Question
I have been working on couple of remote event receivers inside our SharePoint online sites.
I followed the step mentioned in these links:
But I am not sure how I can debug these remote event receivers, even the above 2 links did not mention how we can debug RER?
I remember that I used to debug a remote event receivers using Azure Service Bus, but it seems this approach was deprecated by Microsoft.
So can anyone advice, how can I Debug our ItemAdding
and ItemUpdating
Remove Event Receivers?
Solution
Try debugging your remote event receiver locally as given in the below article:
Remote Event Receivers – you’re all doing it wrong.
In order to use this you will need the following things.
- Node.JS and ngrok.
- Then Start
ngrok
service and create a RER which points to yourngrok
service, instead of real URL. - Then test your RER locally in Visual Studio.
Update:
As per the comments by owner of above article, Derek Gusoff:
ItemAdding
andItemUpdating
are sychnronous events instead of async.- So for such events you just have to implement
ProcessEvent
method instead onProcessOneWayEvent
method.