How to debug a remote event receiver created using WCF service?

sravya shivapuram 211 Reputation points
2021-12-13T13:51:07.097+00:00

I modified an existing remote event receiver( Azure event service) which gets triggered on 'ItemCheckedIn' event attached to 'Documents' library in SharePoint online which was created using WCF web service. Now, I was able to delete it and add the modified event receiver with additional functionality ( this is a new URL) but I am not understanding how to test it. Is there a way I can debug this event receiver while I am checking out and checking in documents in the library so it hits the breakpoint? Currently, it doesn't seem to be doing anything - writing the logs and traces to the application insights but are empty ( Does it mean that the remote event receiver is not being hit? )

Any help is greatly appreciated. Thank you in advance.

Regards
SLS

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. sadomovalex 3,636 Reputation points
    2021-12-13T15:02:55.6+00:00

    you can use ngrok for debugging remote event receiver (RER) on your localhost. The idea is that Sharepoint Online will send request to ngrok url and ngrok will redirect it to your localhost. Check this article: Use Azure function as remote event receiver for Sharepoint Online list and debug it locally with ngrok. It uses Azure functions for RER but it doesn't matter - same approach will also work with WCF.


  2. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-12-14T05:46:55.11+00:00

    Hi @sravya shivapuram ,
    You can debug and troubleshoot a remote event receiver in a SharePoint Add-in. Might the following document is helpful to you
    https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/debug-and-troubleshoot-a-remote-event-receiver-in-a-sharepoint-add-in


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.