I am developing a remote event receiver for our site collection. so inside Visual Studio 2015, i did the following:-
- 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.
inside Azure i created a new service bus, as follow >> i copied the primary connection string:-
inside the visual studio project >> Properties >> SharePoint >> i added the above service bus's primary connection string, as follow:-
i run the project >> where i got this message >> i select the list >> click on "Trust":-
but the visual studio stop running and showed these 2 messages:-
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" ?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
Name="CustomerServiceKB"
ProductID="{28e4281a-1114-4d41-82dd-6277e01c7d34}"
Version="1.0.0.0"
SharePointMinVersion="16.0.0.0"
>
<Properties>
<Title>CustomerServiceKB</Title>
<StartPage>~remoteAppUrl/?{StandardTokens}</StartPage>
<InstalledEventEndpoint>~remoteAppUrl/Services/AppEventReceiver.svc</InstalledEventEndpoint>
<UninstallingEventEndpoint>~remoteAppUrl/Services/AppEventReceiver.svc</UninstallingEventEndpoint>
</Properties>
<AppPrincipal>
<RemoteWebApplication ClientId="*" />
</AppPrincipal>
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="Manage" >
<Property Name="BaseTemplateId" Value="100" />
</AppPermissionRequest>
</AppPermissionRequests>
</App>