Currently I am working with Sharepoint provider hosted app. My app is working fine but when add remote event receiver, I can not able to debug it. And also not able to get context.

I referred these links: http://msdn.microsoft.com/en-us/library/office/fp142381(v=office.15).aspx


I am using Azure for web application hosting. My app is working properly by "Start" from visual studio, but getting error in Output:

Cannot register Services/AppEventReceiver.svc on Windows Azure Service Bus: The remote server returned an error: (500) Internal Server Error. just getting this error

But app is getting installed successfully each time.

2 Answers 2


Please check Service Bus connection type. At the moment there are two types of connection: SAS and ACS.

SAS connection.

To debug remote event receivers you should use ACS connection type. You can check connection type in Azure Portal. Unfortunately, you can't create ACS connection within Azure Portal. You can create ACS connection with Azure Powershell.

New-AzureSBNamespace 'Service_Bus_Name' -CreateACSNamespace $ true -NamespaceType Messaging

enter image description here

You can read my full step-by-step manual here: http://blog.virtosoftware.com/2014/12/creating-and-debugging-of-remote-event.html


You need to deploy Azure Service bus and copy-paste secret key to Visual Studio(use google or screen shots here)

AFAIK - currently in 2018 - powershell commands for Service Bus creation are deprecated. What You can do to create Azure Service Bus - is use templates:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.