I am using VS 2013 and created a simple Provider-Hosted app (used MVC). I have generate Client Secret and Client Id from _layouts/15/appregnew.aspx, updated web.config file and appmanifest.xml file. I have now two problems.

  1. When it does not contain any AppEventHandler, I scceeded to install the app on my online tenant and the mvc project to an Azure web site, but it throws an exception when it executes SharePointContextFilter and says Invalid issuer or signature

  2. I comment the code and add an AppEventHandler, package the app and add it to the app catalog (my online tenant), However when I try to add the app, it says something like It could not add the app. I remove the AppEventHandler by going to the project file properties and changing Handle app installed to false then I can add the app agian.

1 Answer 1


You have to provide proper url in remote event receiver's Element file. If you are note providing that url properly, your app will not able to call remote event receiver. So it gives error.

In case of App event receiver during app installed you have to mention proper url in AppManifest.xml.

      <SupportedLocale CultureName="en-US" />

And in all remote event receivers, you have to mention proper url in Element.xml

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="10003">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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