Pur*_*ome 18 asp.net httpresponse thread-abort
当一个System.Web.HttpResponse.End()被调用时,System.Thread.Abort被触发,我猜是(或触发)异常?我有一些日志记录,这是在日志文件中列出的...
第一次机会
exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
12/14/2008 01:09:31::
Error in Path :/authenticate
Raw Url :/authenticate
Message :Thread was being aborted.
Source :mscorlib
Stack Trace : at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at DotNetOpenId.Response.Send()
at DotNetOpenId.RelyingParty.AuthenticationRequest.RedirectToProvider()
at MyProject.Services.Authentication.OpenIdAuthenticationService.GetOpenIdPersonaDetails(Uri serviceUri) in C:\Users\Pure Krome\Documents\Visual Studio 2008\Projects\MyProject\Projects\Services\Authentication\OpenIdAuthenticationService.cs:line 108
at MyProject.Mvc.Controllers.AuthenticationController.Authenticate() in C:\Users\Pure Krome\Documents\Visual Studio 2008\Projects\MyProject\Projects\MVC Application\Controllers\AuthenticationController.cs:line 69
TargetSite :Void AbortInternal()
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in Ackbar.Mvc.DLL
An exception of type 'System.Threading.ThreadAbortException' occurred in Ackbar.Mvc.DLL but was not handled in user code
Run Code Online (Sandbox Code Playgroud)
这是正常的行为,是否可以优雅地中止而不是(看起来像)突然中止?
到目前为止,普通人口普查是设计的.所以我想知道是否有可能我们可以接受这个问题,看看我们是否可以调整代码,让我们感觉不像我们过早地结束线程并优雅地退出......可能吗?代码示例?