One of my friend had an issue after deploying his provider hosted add-in in SharePoint on premise environment. He was not able to access list data from the add-in web of the Add-in. I looked at the code and the error was something as below.
Get the add-in id by navigating to
App identifier was something like the below and the text which was bolded will be the add-in id.
Get the App Domain by going to below url and giving the add-in id which we got from the above.
My observation was that the App Domain which was given during registering the add-in was different from the url where the add-in has been hosted.
So, I registered the add-in again in the SharePoint site with the correct IIS host header and redeployed the add-in; which lead to work perfectly.