500 Internal Server Error, How to Debug

How can i get logs/debugging for an error 500?

I don't believe this is enough information to go off of, however if you're seeing that 500 error when using the real database and the mock database is working appropriately, I would bet that your issue is with the connection string. You can also check to ensure that you're in the development environment as well.

Update: You can also try to use app.UseDeveloperExceptionPage();

Debugging 500 Internal Server Errors

IIS has several logs. Look for a folder called HTTPErr, probably in Windows\System32\logfiles. This can contain more data.

With a 500 error, it won't ever get to your code, most likely, so there's not a lot you can do really.

How can I debug a 500 Internal Server Error when calling a WebApi from ajax?

To see all exceptions turn following setting on:

  • VS 2013 (and below): Debug -> Exceptions -> CLR - check "when thrown".
  • VS 2015: Debug -> Windows -> Exception Settings -> CLR

You may need to uncheck "Tools->Options->Debugging->My code only" option if exception is thrown really outside of your code.

Django returning 500 Internal Server Error instead of index.html when Debug = False

It turns out that a png file was causing the problem. I don't know why png files sometimes get saved with capital letters, like PNG. Apparently that was causing a problem with whitenoise. It took me a long time to figure it out, hope it helps.



Related Topics



Leave a reply



Submit