I am working on developing sharepoint remote event receiver for our sharepoint online enterprise site collection. i followed these steps:-
1. i create a new Enterprise Wiki Site Collection >> using pnp i enable theSideLoading feature.
2- Inside visual studio 2015 >> create new sharepoint add-in >> provider-hosted Add-in >> i enter the url for a test enterprise wiki site collection which have the Sideloading of apps feature enabled.![enter image description here]()
3- Then i enabled the handle Add-in installed/uninstalled:-
![enter image description here]()
4- Then inside the AppEventReceiver.svc
i entered code as follow, and the methods implementation:-
publicSPRemoteEventResultProcessEvent(SPRemoteEventProperties properties){SPRemoteEventResult result =newSPRemoteEventResult();switch(properties.EventType){caseSPRemoteEventType.AppInstalled:HandleAppInstalled(properties);break;caseSPRemoteEventType.AppUninstalling:HandleAppUninstalling(properties);break;caseSPRemoteEventType.ItemAdded:HandleItemAdded(properties);break;}return result;}// ****** code goes here for the above methods implementation ..*****
5- For debugging the RER >> install the ngrok from https://ngrok.com/>> i run this command:-
ngrok http --host-header=rewrite 54001
where 54001 is the port for our RER, as follow:-
![]()
and i got this results inside the ngrok command windows:-
![]()
6- then i navigate to the remote event receiver service url using the ngrok generated url as follow:-
![]()
7. after that i checked the event receiver add-in inside the debugging site collection , but i got this error:-
![]()
8- then i checked the add-in details >> i found that there is 1 install error as follow:-
![]()
9. and inside visual studio seems it is still trying to install the app:-
![]()
now i am not sure what are the steps we need to follow to be able to debug our remote event receivers? as using the traditional way of create an azure service bus is not longer supported.. here is another question i opened when i tried to use the old
appraoch of creating azure service bus
One or more services were unregistered from the Microsoft Azure Service Bus. Cannot register Services/AppEventReceiver.svc on Microsoft Azure Service Bus: Unable to connect to the remote server