Everything was working perfectly and still is, in my local dev environment (VStudio).
I deployed my web app (consists of an Angular 5 front end and a Core 2 backend) using IIS. I wrote both the Angular and the .NET Core side, everything works fine in local env.
The deployment made my api calls to sharepoint stop working. I get a 500 error without any other information. I tested with Postman to make sure the calls are hitting my controllers, and they do, so that's not the issue,
This is my first time working with sharepoint and angular/.NET:
i. How can I deploy on dev mode to see more details in the 500 error?
ii. Is it at all possible that this may be caused by an authentication issue?
Our sharepoint lists require permissions. I am an admin of the site. When I developed locally, I did not code anything for the authorizations, as all api calls were going through just fine - I assume this is because I am logged into a windows laptop, (the SP authorizations are connected with my windows credentials).
But is it possible that on deployment, that doesn't work anymore, and I would have to write a module for getting authorized?
iii. Are there any other gimmicks or reasons why API calls would stop working after deployment?
Any past experience or suggestions are much welcome! I can't put a finger on what is making this happen.
EDIT:
This is an example call:
ClientContext clientContext = new
ClientContext("https://sharepointsite.com
Web web = clientContext.Web;
ListCollection listColl = web.Lists;
List list = listColl.GetByTitle("Applications");
//----------------------------------------------------
//Display Items in List
//----------------------------------------------------
CamlQuery query = new CamlQuery();
query.ViewXml = "<View/>";
ListItemCollection items = list.GetItems(query);
clientContext.Load(items);
if (clientContext.HasPendingRequest)
{
clientContext.ExecuteQueryAsync().Wait();
}