Starting with 2.0 a StackOverflow Exception can only be caught in the following circumstances.
- The CLR is being run in a hosted environment* where the host specifically allows for StackOverflow exceptions to be handled
- The stackoverflow exception is thrown by user code and not due to an actual stack overflow situation (Reference)
*“hosted environment” as in “my code hosts CLR and I configure CLR’s options” and not “my code runs on shared hosting”