如何使用似乎不会抛出任何异常的MVC应用程序调试情境

时间:2022-03-08 07:28:13

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.

我们最近在Microsoft的MVC框架(v2)上为我们的Intranet开发了一个内部Web应用程序。这似乎工作得非常好,但是在一些尚未知的事件之后,我们看到的情况是数据库查询似乎没有产生任何结果,同时没有捕获异常,这让我有点难过。

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.

为了完整起见,我们正在为MVC应用程序使用专用应用程序池,并使用SQL身份验证连接到SQL Server,该身份验证在Web服务器生气时继续从其他主机进行工作。似乎没有抛出任何异常(我们没有捕获任何异常,并且内置的未处理异常魔法没有捕获任何东西)。我们在这个实例中没有使用LINQ to SQL,而是使用SqlConnection / SqlCommand /存储过程的ADO.Net方法,如果连接失败或存储过程失败,我通常会发出异常。我已经分析了应用程序,它似乎也没有泄漏任何资源。

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.

编辑:我可能应该提到我们正在使用NTLM身份验证,并且像编辑web.config(强制应用程序重新加载)这样的技巧没有任何效果 - 我们必须回收整个应用程序池来修复。

1 个解决方案

#1


1  

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

您是否尝试使用SQL事件探查器来监视异常期间的数据库流量?

#1


1  

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

您是否尝试使用SQL事件探查器来监视异常期间的数据库流量?