[英]Visual Studio 2010 is timing out way too quickly on a website
设置断点并尝试单步执行网站代码后,调试器似乎仅在几秒钟内“超时”并停止调试。 我不知道是什么原因造成的,这让我发疯。
这是我尝试逐步执行的代码:
using (System.Transactions.TransactionScope transaction = new System.Transactions.TransactionScope())
{
// Create new customer.
CustomersBLL customerOperations = new CustomersBLL();
customerOperations.InsertCustomer(quote.CurrentDate, null, null, null, null, null, null, null, null, null);
// Prepare to insert Quote.
// Retrieve CustomerID.
Table = customerOperations.GetNewestCustomerID();
quote.CustomerID = (int)Table.Rows[0][0];
// Get word count and quote amount.
quote.GetWordCount();
quote.GetQuoteAmount();
// Insert Quote
// Insert DocumentFile - must retrieve QuoteNumber.
transaction.Complete();
}
这很可能意味着由于未处理的异常或在IIS中的应用程序池上设置了回收参数而重置了Web应用程序。
要做的第一件事是检查Windows应用程序和系统事件日志,以查看是否报告了未处理的异常。
第二件事是检查您的IIS应用程序池设置,以查看是否有可能满足的短期回收限制。
是否由于应用程序已完成生命周期而停止调试?
我的猜测是您的断点甚至没有得到满足,因为它们位于未执行的代码中。 但是,如果没有看到更多的代码和细节(即断点在哪里),那只是纯粹的猜测。
您收到任何错误还是只是默默停止?
如果您的网站托管在IIS中,并且正在执行调试器附加。 我的猜测是应用程序池即将终止工作线程。
进入IIS,找到应用程序池/右键单击“设置应用程序池默认值”。
Ping Enabled: false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.