Question: I have ASP .NET MVC 2.0 WebApplication, and i need to have a button named "Shut down" or "Block all". It should log out all users, or something like this (mb shut down server).

Is it possible? Thx.

Answer: 
You might try just creating custom ExceptionMiddleware. Just change the process\_exception method to log the exception and request data somewhere.

Here's an example: <http://www.peterbe.com/plog/who-was-logged-in-during-a-django-exception>
If the exception in the django app is not caught, and `DEBUG = True`, then the exception should be sent to the client.

Some options to help you get debugging info:

* [Enable and configure logging](http://docs.djangoproject.com/en/dev/topics/logging/)
* [Set up email error reporting](http://docs.djangoproject.com/en/dev/howto/error-reporting/)
* Use something like [Wireshark](http://www.wireshark.org/) to inspect the HTTP request and responses.