views:

68

answers:

1

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.

+1  A: 

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

Winston Smith
We have tried profiling, and are seeing the requests come through, and they appear to complete with no problems (although I need to triple check with my local friendly DBA later)
Rowland Shaw
Turned out it was successfully returning no results -- as there was a path through the application that meant a vital piece of configuration data hadn't been loaded, which was causing a lazy initialised static property to be set to junk.
Rowland Shaw