I am developing a remote event receiver for our site collection. so inside Visual Studio 2015, i did the following:-

  1. i created a new sharepoint add-in of type provider hosted app. I added the code as per this link https://blogs.msdn.microsoft.com/kaevans/2014/02/26/attaching-remote-event-receivers-to-lists-in-the-host-web/.

For the debugging site collection i chose a test enterprise wiki online site collection which I have enabled its Sideloading of apps feature.

  1. inside Azure i created a new service bus, as follow >> i copied the primary connection string:- enter image description here

  2. inside the visual studio project >> Properties >> SharePoint >> i added the above service bus's primary connection string, as follow:- enter image description here

  3. i run the project >> where i got this message >> i select the list >> click on "Trust":- enter image description here

  4. i got the app home page as follow:- enter image description here

  5. i got the app added correctly inside my site content:- enter image description here

but the visual studio stop running and showed these 2 messages:- enter image description here

One or more services were unregistered from the Microsoft Azure Service Bus. Cannot register Services/AppEventReceiver.svc on Microsoft Azure Service Bus: Unable to connect to the remote server

so i am not sure what is going on ? why the service bus is not working, and as a result we are not able to debug our remote event receiver?

here is my AppManifest.xml:-

<?xml version="1.0" encoding="utf-8" ?>
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"

    <RemoteWebApplication ClientId="*" />
  <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="Manage" >
       <Property Name="BaseTemplateId" Value="100" />

2 Answers 2


Right-click on your SharePoint App project in Visual Studio and select “SharePoint“. There you can uncheck “Enable Remote Event Debugging“. It no longer works with debugging provided hosted app. Instead attach a cloud debugger to the azure web app to debug.

enter image description here

  • ok thanks for the reply. but you mentioned ` Instead attach a cloud debugger to the azure web app to debug.` ...But in my case i am still developing the project inside visual studio,, so still i did not deploy it inside azure.. so is there a similar/exact replacement to what the azure service bus use to do, in enabling us to debug the RER (Provider-Hosted app) inside visual studio?
    – John John
    Mar 31, 2019 at 15:41
  • 1
    You can use ngrok instead google.com/amp/s/derekgusoff.wordpress.com/2017/11/08/… Mar 31, 2019 at 19:04
  • thanks i already read this link before,, but it uses different appraoch for creating RER.. now i am following the steps mentioned here blogs.msdn.microsoft.com/kaevans/2014/02/26/… so can i use ngrok instead of azure service bus in my case?
    – John John
    Mar 31, 2019 at 22:44
  • Yes try ngrok instead Apr 2, 2019 at 8:27
  • i ried it, but when i type the generated url such as http://ebec8431.ngrok.io/Services/AppEventReceiver.svc while the visual studio is running, i got 502 Bad Gateway
    – John John
    Apr 2, 2019 at 9:22

I've founded a little trick. We should launch VS as an administrator. This simple action solved the same issue as described in the topic.


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.