When an app for SharePoint project in Visual Studio includes a remote event receiver (RER) or an app event receiver, you have to do some additional quick configuration in the project properties before you can debug the app with F5. This configuration, in turn, requires that you do some Azure configuration.
You do not have to repeat the Azure configuration for every project that has an RER or app event. (If the app includes an AppInstalled event handler, the app won’t even run with either F5 or Ctrl-F5 [run without debugging] unless you carry out the configuration in this section.)
Check for error in ULS Log under App Deployment.
Probable error can be-The HTTP request is unauthorized with client authentication scheme ‘Anonymous’.
The authentication header received from the server was ‘NTLM,Negotiate’
Now, insert the following code in your web.config:
<protocolMapping> <add binding="basicHttpBinding" scheme="https" bindingConfiguration="secureBinding" /> </protocolMapping>
Go to IIS, under Authentication set Anonymous Authentication-ENABLED:
Now Enable Anonymous Authentication in your project as well:
Deploy the App again and it will work.
You may like following SharePoint tutorials:
- Create a Unique Project ID and automated folder structure under document library using Event Receiver in SharePoint
- BeforeProperties and AfterProperties in Event Receiver in SharePoint
- Fetch all users to a custom list using event receiver in SharePoint
- Event Receivers in SharePoint 2010
- Disable event firing on SharePoint list item update in SharePoint
- Create an event handler to prevent items from deleting item from SharePoint list using Visual Studio 2010
- How to use WebProvisioned event in SharePoint 2010?
Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.