Contents
Server Side Object Model code and deployed via Solutions. In this scenario, the event receiver code runs on the SharePoint server. In an SharePoint Add-in model scenario, event receivers are created outside of SharePoint inside a web service and registered with SharePoint. These are called as Remote Event Receivers (RER).
Where are event receivers and list event receivers created?
In a typical Full Trust Code (FTC) / Farm Solution scenario, Event Receivers and List Event Receivers were created with the SharePoint Server Side Object Model code and deployed via Solutions. In this scenario, the event receiver code runs on the SharePoint server.
Can you add event receivers without app context?
Event receivers added to host web without app context, for example with SharePointOnlineCredentials or other means, will not return access token and you’ll have to access the host web with app-only access token Adding event receivers to the host web is supported. It is only possible to do this via CSOM/REST APIs, not by using Visual Studio wizards.
How to minimize calls from handler web service to SharePoint?
Use the handler delegation strategy to minimize calls from the handler web service to SharePoint. Use the CSOM classes ExceptionHandlingScope and ConditionalScope. Incorporate rollback logic if the handler encounters an error.
How to debug event receivers in azure and Visual Studio?
To debug event receivers you need to configure a few different things in Azure and Visual Studio. The following article provide step by step instructions and more information related to debugging.
Incorporate “already done” logic to accommodate the fact that SharePoint retries the handler up to three more times if it fails or takes more than 30 seconds to complete. Use the handler delegation strategy to minimize calls from the handler web service to SharePoint. Use the CSOM classes ExceptionHandlingScope and ConditionalScope.