看板 C_Sharp 關於我們 聯絡資訊
常常在Try...Catch...中寫了Response.End() 就容易出現ThreadAbortException~ 有時在Log有時在前端的Browser... 實在覺得很困擾~ 依據微軟KB 312629的說明 可以用HttpContext.Current.ApplicationInstance.CompleteRequest() 來取代Response.End() 我通常會把給user的訊息寫在一支共用的class中 同時也習慣把Response.End()加在需要終止的訊息後面 請問是不是能夠完全以ApplicationInstance.CompleteRequest() 取代所有會用到Response.End()的部份呢? 還是只有在try catch的時候才能這樣用?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 221.169.11.2