How do I debug a situation with an MVC application that doesn't appear to throw any exceptions

Question!

We've recently developed an internal web application for our intranet on top Microsoft's MVC Framework (v2). This seems to work wonderfully, but after some as yet unknown events, we're seeing a situation where database queries appear to yield no results, whilst no exceptions are caught, which has stumped me somewhat.

Republishing the application doesn't change the behaviour, but restarting the application pool will restore functionality completely.

For completeness, we're using a dedicated application pool for MVC applications, and connect to SQL Server using SQL Authentication, which carries on working from other hosts whilst the web server is having a sulk. There don't appear to be any exceptions thrown (we're not catching any, and the built in unhandled exception magic isn't catching anything). We're not using LINQ to SQL in this instance, but rather the ADO.Net approach of SqlConnection/SqlCommand/stored procedures which I'd normally expect to throw an exception if they failed to connect, or a stored procedure failed. I've profiled the application and it doesn't appear to leak any resources either.

I think I've covered all the angles, but where else should I look to get into the forensics of finding the cause of the issue?

EDIT: I probably should mention that we're using NTLM authentication, and doing tricks like editing the web.config (to force the application to reload) has no effect -- we have to recycle the whole application pool to fix.



Answers

Have you tried using SQL profiler to monitor the database traffic during the anomaly?



This video can help you solving your question :)
By: admin