The sample code in this solution simply appends text to the Description field.If you attempt to uninstall the add-in while debugging, you will notice that you receive a permission denied error.Open the Remote Event Receiver Jobs list and add a new item.Clicking Save will cause the remote event receiver endpoint to be called.This is done to facilitate easy debugging using Windows Azure Service Bus.The same code works while debugging locally as well as when the add-in is deployed to production.When you update an item in an Item Updated/Item Updating remote event receiver then this will trigger a new execution of that same Item Updated/Item Updating event receiver..again..again...
To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.
The add-in begins to install, and the break-point will be hit.
Continue debugging, and the add-in will finally render the full-page experience.
A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source. For more information about handling events, see NIB: Consuming Events.
This scenario shows how an add-in can use the add-in Installed event to perform additional work in the host web, such as attaching event receivers to lists in the host web.