Remote event receiver working well when debug locally, but did not work after publishing it to azure

Valued Contributor

I have developed a remote event receiver for our classic online team site. the RER worked well when i debug it locally, bu after publishing it to azure the RER is not having any effect. here are the steps i followed to deploy them to azure:-

 

1. i generate the client and secret id, using this url inside our classic team site https://****.sharepoint.com/_layouts/15/appregnew.aspx 

2. then i access the app from the SP admin center @ https://***-admin.sharepoint.com/_layouts/15/appinv.aspx and i grant the app the following xml permission:-

 

 

<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
</AppPermissionRequests>

 

 

3. I create a new App Service inside azure

4. i got the public profile for the app service >> using VS 2019 >> i update the web.config with the generate client and client secret (generated from step number-1)>>i publish it using the ftp:-

validate.png

5.  now i can access the app service + the .svc service, here is the result i got when i access the service (rer.svc in my case):-

3QTKl.png

6. then i used this PnP script to add the RER and link it to the list:-

 

 

Add-PnPEventReceiver -List "Project System" -Name "PUSRERupdating" -Url https://tgrouppusrer.azurewebsites.net/rer.svc -EventReceiverType ItemUpdating -Synchronization Synchronous

Add-PnPEventReceiver -List "Project System" -Name "PUSRERupdated" -Url https://tgrouppusrer.azurewebsites.net/rer.svc -EventReceiverType ItemUpdated -Synchronization Asynchronous

 

but when i update any item inside the Project system list, i will not get any effect. final not i am following the approach mentioned in this link @ https://derekgusoff.wordpress.com/2017/11/08/remote-event-receivers-youre-all-doing-it-wrong/  to create and deploy the RER, which again worked well when i debug it locally.

0 Replies