SMA286003: Remove WebEventReceiver |
Event Receivers are deployed to the farm, causing slowdown in other components, and decreasing flexibility when migrating, updating, and in disaster recovery.
CheckId | SMA286003 |
---|---|
TypeName | WebEventReceiverRecommendations |
Severity | CriticalError |
Type | Receiver |
Full Trust Approach | App Approach |
---|---|
Acting on information as it is given, when it is given
An event is a condition that has been met in a List/Web which then calls a code based solution (The Receiver) to perform some sort of action with this information. They cover events created, adding, added, deleting, deleted, check in, check out, moving, updating, updated, broken and reset on various components in SharePoint. They are deployed through a feature and attached to a List or Web object, and implement one of the events allowed for that type of object. Typical usages include Checking Validity of Data Entered, Making Additions to Data, Transforming Data, or performing further tasks on this data. This code will run on the SharePoint farm when the data is entered, either in the same action or in the background, depending on the type of action that was taken. |
Acting on the same information remotely
Remote event receivers follow the same premise of their Full Trust counterparts. They have mostly the same events (3 additional for Apps, and several unneeded ones removed). |
Impact of Full Trust Approach | Benefit of App Approach |
Performance Issues
Due to the inline nature of some event receiver methods, even common practices like saving an item can increase load. If a list is accessed a lot in a company then this issue, which may not have been apparent in development quickly scales out, and slows other parts of the SharePoint server down. |
Seperation of Workflow
The remote model of apps, takes the processing away from the farm, into a seperate dedicated resource. Queueing systems in place allow for simple and steady flows of data, while retaining security and governance. Increased Disaster Recovery ReliabilityIf anything does go wrong on the SharePoint farm, the remote event receivers can be made to wait to reconnect, instead of the alternative, having them run locally, and losing the data which was being processed. This means that data loss chance is substantially reduced when using many Event Receivers in your Farm. The other benefit of having no deployed files to the server, means that you are only backing up the content database, ensuring a faster and more accurate disaster recovery process overall. |
Efforts and Benefits
Migration Impact | High |
Re-Design Effort | Low |
Re-Development Effort | Medium ~ High |
Long Term Benefit | High |
Effort Drivers
- Performance of Main Farm
- Increased Disaster Recovery Reliability
To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.