I have the following question on how many Azure Web Apps i need to create, for hosting 8 Remote Event Receivers? Where In my case i have 8 Remote Event Receivers, which have been developed as Provider Hosted Apps. I want to deploy these 8 Remote Event Receivers inside Azure, but i am now sure how many Azure Web Apps i need create?

For example each Azure Web App will have a url such as https://123******.azurewebsites.net. Here is the settings for an Azure Web App, inside my Azure subscription account :-

enter image description here

Then when I register my App inside my site collection (using /_layouts/15/appregnew.aspx page), i will provide the Azure Web App URL inside the App Damion field, as follow:-

enter image description here

So do i need 8 Azure Web Apps URLs (8 different App Domains), to register and host my Remote Event Receivers? Or i can use the same Azure Web App url to register multiple Remote Event Receivers?



Yes you can - an event receiver is just an endpoint and a web app can have any number of these.

The App model is what's tripping you up as it's not very well thought out and doesn't scale well to real world scenarios such as this. You can in fact use event receivers without using the App model at all. I wrote a blog post partly inspired by people's frustrations with remote event receivers on this site. Have a look if you'd like: https://derekgusoff.wordpress.com/2017/11/08/remote-event-receivers-youre-all-doing-it-wrong/

  • to be honest dealing with Remote Event Receivers is the worst experience i have ever faced. from debugging to deploying.. now i have already read your link which looks great, but the problem is that in my case i have many synchronous events such as (adding,editing, etc) since i need to check some conditions before proceeding with the Edit/Create operations.. so that why i chose to have Remote Event Receivers, instead of following your appraoch. so back to my original question. now i did a test of hosting 2 RERs inside the same Azure Web App url, where inside Azure – john Gu Jan 25 '18 at 15:36
  • >> i created a new Web App >> i got a url as follow https://test200.azurewebsites.net/.. now i developed 2 RERs, then when i register my first RER using the /_layouts/15/appregnew.aspx page inside my site collection, i entered the url test200.azurewebsites.net/ inside the "App domain"field, then my first RER worked well. after that i repeated the same steps for the second RER, after that the second RER works well, but the first RER stopped working.. – john Gu Jan 25 '18 at 15:36
  • now i am pretty sure that i am doing something wrong because both RERs will have the same <StartPage>~remoteAppUrl/?{StandardTokens}</StartPage> <InstalledEventEndpoint>~remoteAppUrl/Services/AppEventReceiver.svc</InstalledEventEndpoint> <UninstallingEventEndpoint>~remoteAppUrl/Services/AppEventReceiver.svc</UninstallingEventEndpoint> inside the app manifest.xml+ they do have the same AppEventReceiver.svc file .. so logically speaking 2 different things can not be deployed under thet same url.. – john Gu Jan 25 '18 at 15:36
  • 1
    Here's another brilliant article on using Remote Event Receivers outside a provider hosted app. spblog.net/post/2017/09/09/… – Derek Gusoff Jan 25 '18 at 17:15
  • 1
    You can just create another WCF service and implement it, and deploy to the same web app. I agree, the documentation is horrible for remote event receivers. This site probably gets 15 or 20 questions a week from people just as confused as you at the approach. The app, appmanifest, and all that other garbage is what's tripping you up. It just doesn't support what you're trying to do. All you need is an endpoint and a registration. – Derek Gusoff Jan 26 '18 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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