I have a recurrent issue with .NET applications that don't start (on others systems than mine). The fact is that I cannot, unfortunately, always create a smoothly running package. Therefore I often have to send a ZIP file of my Debug or Release folder.
My real problem is that these applications doesn't tell WHY they're not starting. I just get no exception at all if I start them from the command line, neither in the EventLog, or even if I try to print on the output the result of a Try Catch block on all my application... am I missing something?
Most of the time, it's missing libraries, or security related issues. But it would be nice to find what exactly is going on painlessly :D
The best way to monitor the performance of your ASP.NET application is with an application performance management (APM) solution. Retrace tracks the performance of your application down to the code level and provides detailed reporting of ASP.NET application performance.
Have you tried looking at the fusion logs? Suzanne Cook has an article on this here.
Another thing to do (to minimise silent errors): minimise your Main
method; the reason for this is that JIT works per-method, and if it can't JIT Main
it can't use your exception handling:
/* for winform, you still new [STAThread] here */
static void Main() {
try {
MainCore();
} catch (Exception ex) {
// shout about it
}
}
[MethodImpl(MethodImplOptions.NoInlining)] // usually overkill
static void MainCore() {
// real code
}
Take a look at the Assembly Binding Log Viewer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With