2013-04-29 74 views
0

目前,我正在查詢一個有600萬條記錄的sql server數據庫。長查詢:有誰知道這個錯誤是什麼?

在查詢中指定日期範圍以過濾結果。當日期範圍很短時,即2小時時,應用程序顯示結果沒有問題。

但是,如果日期範圍是多一點的時間,也就是一個星期,該應用程序會顯示以下錯誤:

enter image description here

enter image description here

最後,當我已經接受了前兩次失誤,和我點擊應用程序的任何其他部分我得到以下錯誤:

enter image description here

奇怪的是,這種行爲只發生在活動服務器上(運行在iis7上),而在本地主機(casini)中,應用程序顯示查詢結果,而不管數據範圍的值。

任何想法如何解決這個問題將不勝感激。

+0

從'Sys.WebForms',我猜你正在使用ASP.NET經典形式。考慮記錄錯誤服務器端。 'Global.asax'中的'Application_Error'是記錄站點範圍內異常的好地方。 – Andomar 2013-04-29 14:09:57

+0

@Andomar我已經這麼做了。我在數據庫和事件查看器中記錄錯誤。但是,由於沒有將記錄插入到這兩個錯誤日誌中,所以看起來錯誤沒有得到 – aleafonso 2013-04-29 14:13:27

回答

0

爲了您的第一個問題,看了下面的文章here

When an error occurs on the server while the request is being processed, an error response is returned to the browser and a PageRequestManagerServerErrorExceptionobject is created by using the Error.create function. To customize error handling and to display more information about the server error, handle the AsyncPostBackError event and use the AsyncPostBackErrorMessage and AllowCustomErrorsRedirect properties. For an example of how to provide custom error handling during partial-page updates, see Customizing Error Handling for ASP.NET UpdatePanel Controls.

對於第二個問題,可能是你可以得到解決here

Solution: Our web server could not resolve the URL of the back-end website. We needed to add a hosts file entry on our server to resolve the issue.

相關問題