C#C
C#17mo ago
94 replies
Cruel

Question about IIS /API Issue

Had a really weird issue at work today in production where a specific endpoint on an api stopped working and would return 500 just saying 'An Error Has Occured' (or something like that).

From the checks I did this 1 endpoint had just stopped working while all other endpoints in the project (and even endpoints in the same controller) continued to work. We had no code or database changes deployed to production around this time (or even for the previous week). It also seemed like the error wasn't even getting to the bit where it actually runs the endpoint logic etc, almost like it was at the IIS level or network level or something. I say this because one thing we noticed is that it would return a 500 response even if you called the endpoint unauthenticated (but if it actually hit our code it would have returned unauthorized)

In the end restarting the app pool the api was in from IIS fixed the issue. Any ideas?
Was this page helpful?