How to fix "The remote server returned an error: (403) Forbidden" on Sharepoint PHA Add-in Install Event? RRS feed

  • Question


    We have a SharePoint Provider Hosted Add-in that has install events.
    The Web project is published on a different server than the SharePoint server.

    The add-in installs successfully when it had no add-in event enabled, after adding the add-in event the app fails to install.

    Upon checking the error, i've found out that it throws 

    "The remote server returned an error: (403) Forbidden."

    whenever the code hits 


    Here is the StackTrace:

    at System.Net.HttpWebRequest.GetResponse()       

    at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()     

    at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)

    Does anyone have any suggestion on how to troubleshoot this or how to resolve this error?

    Monday, May 20, 2019 9:52 AM

All replies