I was trying to compile the list of frequently asked questions on SharePoint 2013 Remote Event receivers, for my understanding. Here is the list that I compiled.
1. Can we run client-side code from remote event receivers?
No, we cannot run client-side code from remote event receivers
2. How does remote event receiver work fundamentally?
The User performs an action on SharePoint list or library. Based on the action event, the SharePoint communicates with the registered WCF service (defined for remote event). The WCF service communicates with Azure Access Control Services (ACS) and gets signed token from ACS. Using the signed token, the remote WCF services perform necessary action on the SharePoint list or library (based on action).
3. What are the various types of event scopes that are supported?
Remote event receivers are supported at list-level and library-level.
4. How do we debug remote event receivers?
Go to Project Properties in Visual Studio 2012 à SharePoint à Enable remote debugging
Then, set the Azure Service Bus End Point for debugging remote event receivers. Prior to that we need to register for a Windows Azure Service Bus, please check this post https://sundarnarasiman.net/?p=107 for more details on registering an Azure Service Bus.
5. How do we debug remote event receivers?
Go to Project Properties in Visual Studio 2012 à SharePoint à Enable remote debugging
6. Whether the SharePoint 2010 event handler will work automatically after upgrading to SharePoint 2013?
There is no guaranteed that the SP 2010 Event Handler Solution Package will work 100% after upgrade. It may be require re-factoring SP 2010 event handler into an App for SharePoint in SharePoint 2013.
7. Can we have remote event receivers implemented as SharePoint Hosted App in SharePoint 2013?
No. The SharePoint 2013 Remote Event receivers require a WCF service to call back to SharePoint 2013 based on the fired event (remote). In order to host a WCF service, we need a remote Web project, which is feasible only in Auto Hosted App or Provider Hosted App. Hence remote event receivers can’t be implemented as SharePoint Hosted App (as of now).
8. What are the various types of App Models supported by Remote Event Receivers?
a)SharePoint Hosted Apps
b)Provider Hosted Apps
8. Does SharePoint 2013 remote event receivers support synchronous and asynchronous events?
Yes, the remote event receivers have support for both Synchronous and Asynchronous events. It has two methods ProcessEvent and ProcessOneWayEvent :-
ProcessEvent – this typically occurs before an action occurs like when a user adds or deletes and item. It is also called as Synchronous events which typically handles “-ing” events.
ProcessOneWayEvent – this typically occurs after an action occurs. It is also called as Asynchronous events which typically handles “-ed” events.
9. Can we have remote event receivers registered for Host Web in SharePoint?
By default remote event receivers in Visual Studio are registered for App Web only, not Host Web. We can use CSOM to explicitly register the event receiver for Host Web, assuming that App has already requested Permission to manage host web.
10. How SharePoint 2013 Remote event receivers work differently from SharePoint 2010 event receivers?
In SharePoint 2010, the event receivers which handles events of Lists, Libraries or Sites, runs the code on the SharePoint farm itself. In SharePoint 2013, the piece of the code which handles events (WCF) runs outside of SharePoint remotely.
I like your post.the Question and answers are good knowledge sharing.
Rozeena
Rozeena
thank you