[ERROR]Sys.WebForms.PageRequestManagerServerErrorException: Timeout expired.

當asp.net web page發生Sys.WebForms.PageRequestManagerServerErrorException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. status 500,要檢查那裡呢?

今天同事問說有支報表程式發生Timeout! 便詢問他說是Client Timeout 或是Server Timeout呢?

看了一下,是ScriptManager’s AsyncPostBackTimeout,於是設定AsyncPostBackTimeout的屬性(原本程式沒有設定)報表就順利產生出來。

後來當程式設定另一個篩選條件時,程式就發生以下的訊息,

Sys.WebForms.PageRequestManagerServerErrorException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

 

Httpwatch錄Response出來的結果如下,

114|error|500|Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.|

 

參考「Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding ( Randomally)」,於是又檢查了SQL Command的Timeout設定,原來是沒有設定CommandTimeout。

目前是將CommandTimeout屬性設定長一點,問題就解決了!

Hi, 

亂馬客Blog已移到了 「亂馬客​ : Re:從零開始的軟體開發生活

請大家繼續支持 ^_^