Error from the server ( 500 ) in an ASP.NET WebApi project

32 Views Asked by At

I have a ASP.NET WebApi project which runs on my localhost. However, on the hosting provider's server I get a 500 Internal server error. The try-catch block does not capture any Exception and the logger does not work, so I had to manually search for the line that is causing the issue by changing the location of the return of a response from the server. For whatever reason, on this line the server seems to crash by returning a 500 Internal Server Error:

var httpRequest = HttpContext.Current.Request;

What am I doing wrong here ?

0

There are 0 best solutions below