SharePoint Online Remote Event Receiver and Service Bus issue
-
29-01-2021 - |
Вопрос
I am following this guide to create Remote Event Receivers (RER) in SharePoint Online: https://blogs.msdn.microsoft.com/kaevans/2014/02/26/attaching-remote-event-receivers-to-lists-in-the-host-web/
In the guide, it mentions to use Azure Service Bus for debugging. However, when I tried to do that, it gives the following error:
The remote event receiver callout failed. Details: There was no endpoint listening
On further research, it seems to be because the Service Bus is now using SAS instead of ACS. And ACS is what is needed to be able to use the Service Bus to debug the RER.
I tried manually creating ACS via PowerShell but it gives error that it is not supported anymore.
Is there any additional options I can use to debug Remote Event Receivers in SharePoint Online. Or do I have to develop against On-Premise first? Or can I deploy Web Service to Azure and remote debug if that's possible?
Решение
Two options:
- Use the cloud explorer in Visual Studio and "attach debugger"
- Use a proxy like ngrok. I have a blog post that shows how to do that: https://derekgusoff.wordpress.com/2017/11/08/remote-event-receivers-youre-all-doing-it-wrong/