When an ASP.NET System.Web.HttpResponse.End() is called, the current thread is aborted?

前端 未结 5 503
你的背包
你的背包 2020-12-31 03:56

when a System.Web.HttpResponse.End() is called a System.Thread.Abort is being fired, which i\'m guessing is (or fires) an exception? I\'ve got some logging and this is being

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 04:46

    Don't use Response.End() method because it uses Application.End() and stop the application. Further use HTTP request or response violating Page Life Cycle. Use HttpContext.Current.Response.Close() or HttpContext.Current.ApplicationInstance.CompleteRequest();

提交回复
热议问题