Remote Event Receivers (RER's) in Provider Hosted apps

Hello,

I am working on Remote event receivers for host web custom lists in SharePoint 2013 online.

I have created two provider hosted apps say, 1. TargetAnnouncementsWorkflowApp (with RER on MyAnnouncement list: /Services/TargetAppEventReceiver.svc), and 2. UpdateMyListWorkflowApp (with RER on MyList list: /Services/UpdateAppEventReceiver.svc).

I have created two azure websites for each say, 1. https://myworkflow.azurewebsites.net/  and

2. https://mysecondworkflow.azurewebsites.net/

I have registered the apps under say, https://mysitename.sharepoint.com/_layouts/15/appregnew.aspx

and added client ID, Secret of each to above apps under app: Publish and appweb file: web.config.

Now I have published both appwebs to both azure websites, which are

1. https://myworkflow.azurewebsites.net/services/TargetAppEventReceiver.svc

2. https://mysecondworkflow.azurewebsites.net/services/UpdateAppEventReceiver.svc

and then I have published the apps and uploaded them to app catalog and then to the site collection. The apps (RER's) work fine.

------------------------------------------------------------------------------------

So my questions are:

1. Now I am trying to use only one Azure website (to save resources) and deployed both app webs to it:

    a. https://myworkflow.azurewebsites.net/services/TargetAppEventReceiver.svc

    b. https://myworkflow.azurewebsites.net/services/UpdateAppEventReceiver.svc

2. I have republished both provider hosted apps to read same client id's and secret's or do I need to make any changes here. Is there any way to make single provider hosted app which on appinstalled handles both .svc's or not (separate custom lists).

3. The remote event handler is not firing now. When I tried to delete the app and re-install the app, I get an error: Sorry, something went wrong with adding the app. Click to retry. Do I need to update version number of apps and republish and install.

Can you please guide me, where I am doing wrong?

I hope this is very helpful topic. Please share your ideas.

May 19th, 2015 10:37am

Hello SravanB,

Versioning would not be an issue.(you can use the same version each time. but it is a good practice to keep the changing version(minor or major) for production env).

Did you check whether the RER is attached with the MyAnnouncement list. (you can refer the blog to check the list of RER attached with your list >> http://www.sharepointnutsandbolts.com/2014/01/add-delete-and-list-remote-event-receivers.html).

Try changing the client id, issuer id and register certificates(create another self signed certificate) with powershell again.

Also, verify you app installation event code for any bug.

Let us know the outcome.

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 12:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics