My Remote Event Receiver works in Debug, but not when published

Okay, I had exactly this issue – that my SharePoint App supporting my Remote Event Receivers would work when run under an F5 – debug deploy, but not when published properly. Annoyingly, I’ve found that I have to make a number of changes when moving between a ‘proper’ build, and an F5-deploy; I’ve mentioned those before, but they were turning off the AppUninstalling event, and replacing the ClientId in the app manifest with a *.

However, I’d checked these things, and my code still didn’t work. Continue reading “My Remote Event Receiver works in Debug, but not when published”

Advertisement
My Remote Event Receiver works in Debug, but not when published

Remote Event Receivers: Identify when a document's metadata is first completed

Document events are a perennial problem in SharePoint. This is, in part, due to the way documents are put into SharePoint:

  • You upload the document into SharePoint…
  • …which fires ItemAdded …
  • …then you complete the metadata…
  • …which fires item updated.

So, my problem was that our customer wanted an email sent when a document was first ‘added’ to SharePoint – except that by added they meant “Has been uploaded and it’s metadata completed for the first time”. While SharePoint does, technically, fire the correct events at the correct times, it’s pretty easy to see this ‘business event’ is probably more useful. Continue reading “Remote Event Receivers: Identify when a document's metadata is first completed”

Remote Event Receivers: Identify when a document's metadata is first completed

Register Remote Event Receivers on the HOST web

The project that I’m working on requires that I add remote event receivers to the host web for my Provider-hosted app. This is a little unusual – most of the stuff I found about remote event receivers was using the app web. It turns out, though, that it is possible, and there is a good explanation of how it works by Johnny Tordgeman on CodeProject. Rather than repeat all he’s said, I suggest you take a look. I just want to expand on some of the things I learnt doing this, that he didn’t mention. Continue reading “Register Remote Event Receivers on the HOST web”

Register Remote Event Receivers on the HOST web

App Deployment Error: "Your app handles the uninstalling app event"

When trying to do an F5-Deploy of a Provider hosted app from Visual Studio, I got this error during the deployment:

Error occurred in deployment step ‘Uninstall app for SharePoint’: Your app handles the uninstalling app event. Ensure that the Windows Azure Cloud Web Service project is deployed to the emulator prior to uninstalling the app.

This happened just after the step “Uninstall app for SharePoint” in the process. Continue reading “App Deployment Error: "Your app handles the uninstalling app event"”

App Deployment Error: "Your app handles the uninstalling app event"

Handle your Provider Hosted SharePoint App 'App Installed' event

I’m creating a Provider-hosted app, and I want to do some things when the app is installed/uninstalled. It isn’t immediately obvious how you set that up in VS2012. Continue reading “Handle your Provider Hosted SharePoint App 'App Installed' event”

Handle your Provider Hosted SharePoint App 'App Installed' event