I've created an AppEventReceiver for my High Trust Remote app, when I deploy the app through Visual Studio 2012 I get the following error
The remote event receiver callout failed
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
My remote app is published to an IIS website with Windows Authentication enabled and Annoymous disabled as detailed in the instructions to set this up in the MSDN docs.
If I turn on Anonymous Authentication it trips up the TokenHelper class (I think because there is no Windows Identity)
From the error message it seems like SharePoint is trying to call the AppEventReceiver endpoint using Anonymous authenctication and my IIS site is expecting NTLM.
They are both hosted on the same server in the same IIS instance.
Am I missing some configuration or setting here?
If I remove the AppEventReceiver, the app deploys without any problems