Compartir a través de


Debugging Remote Event Receivers in SharePoint 2013

Alright, My Fellow SharePointers!!

Recently, I was trying to debug a new feature that is introduced in SharePoint 2013 and I known to all of us by the name “Remote Event Receivers” or RERs.

 

You might be wondering why I’m talking just about debugging this feature and not about the development aspects.

Well, this is due one simple reason which is Debugging a remote event receiver is/was an uphill task and I left it to you guys to decide it among yourselves if it was or its still a concern.

Ok, enough! Now, tell me what information you came with here:

1. “Remote event Receivers are not firing up or even if they are, then not all events that I’ve written code for are firing up”.

In order to debug such scenarios, the first place that you should be looking at is “App for SharePoint Events” section in your app properties:

image

 

Alternatively, open your AppManifest.xml in code view and then look for the following section as depicted in screen shot below:

image

Ok, coming back to the reason why I want you to look at these properties is simply because at times we may have written the code in our event receiver project (AppEventReceiver.svc file in this example) which handles all the app related events but, if any of the relative properties in your AppManifest.xml file is absent you’ll waste several hours trying to figure out what went wrong with your code and eventually you’ll start blaming the product for not functioning well.

 

2. “I’ve got the RTM version of Office developer tools for VS 2012 and I’ve got my Windows Azure Service Bus connection string, but still I’m unable to debug RERs”.

(If you’re looking to find information on how to debug a RER with office developer tools for VS 2012, please check this blog by the Microsoft Office Team)

The second reason is also tied up the one mentioned above. If you had forgot to set any of the app related events in your AppManifest.xml file for which you have handled the code in your Remote Event Receiver WCF Service, your debugger might not fire up. I’ve personally faced this particular issue and hence though of making you aware so that you won’t spend time to figure out what went wrong.

 

Happy Coding!!!

 

Cheers,

Vaibhav