提交时会触发PerformTimerCallback

时间:2011-11-30 13:14:29

标签: asp.net

当用户在我的Web应用程序中的页面中提交按钮时,该事件将被触发两次。正常的提交请求,之后还会执行计时器回调事件,并再次发生相同的提交。结果是,相同的数据被插入数据库两次。我正在将我的堆栈跟踪放在下面。

[0] App_Code.DBAccess.PrintLog (System.String log) <il+12, n+165>   
 [1] Agents_AgentHome.DataSubmit () <il+10, n+53>   
 [2] Agents_AgentHome.BtnSubmitNext_Click (System.Object sender, System.EventArgs e) <il+6, n+6>   
 [3] System.Web.UI.WebControls.Button.OnClick (System.EventArgs e) <il+33, n+112>   
 [4] System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String eventArgument) <il+49, n+111>   
 [5] System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) <il+7, n+11>   
 [6] System.Web.UI.Page.RaisePostBackEvent (System.Web.UI.IPostBackEventHandler sourceControl, System.String eventArgument) <il+7, n+14>   
 [7] System.Web.UI.Page.RaisePostBackEvent (System.Collections.Specialized.NameValueCollection postData) <il+21, n+37>   
 [8] System.Web.UI.Page.ProcessRequestMain (System.Boolean includeStagesBeforeAsyncPoint, System.Boolean includeStagesAfterAsyncPoint) <il+1462, n+1566>   
 [9] System.Web.UI.Page.ProcessRequest (System.Boolean includeStagesBeforeAsyncPoint, System.Boolean includeStagesAfterAsyncPoint) <il+60, n+132>   
 [10] System.Web.UI.Page.ProcessRequest () <il+20, n+81>   
 [11] System.Web.UI.Page.ProcessRequestWithNoAssert (System.Web.HttpContext context) <il+13, n+22>   
 [12] System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) <il+57, n+50>   
 [13] ASP.agents_callerdetails_aspx.ProcessRequest (System.Web.HttpContext context) <il+7, n+5>   
 [14] System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () <il+285, n+182>   
 [15] System.Web.HttpApplication.ExecuteStep (System.Web.HttpApplication+IExecutionStep step, System.Boolean& completedSynchronously) <il+21, n+76>   
 [16] System.Web.HttpApplication+ApplicationStepManager.ResumeSteps (System.Exception error) <il+244, n+307>   
 [17] System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback cb, System.Object extraData) <il+92, n+124>   
 [18] System.Web.HttpRuntime.ProcessRequestInternal (System.Web.HttpWorkerRequest wr) <il+237, n+380>   
 [19] System.Web.HttpRuntime.ProcessRequestNoDemand (System.Web.HttpWorkerRequest wr) <il+44, n+99>   
 [20] System.Web.Hosting.ISAPIRuntime.ProcessRequest (System.IntPtr ecb, System.Int32 iWRType) <il+75, n+284>  





[0] App_Code.DBAccess.PrintLog (System.String log) <il+12, n+165>   
 [1] Agents_AgentHome.DataSubmit () <il+10, n+53>   
 [2] Agents_AgentHome.BtnSubmitNext_Click (System.Object sender, System.EventArgs e) <il+6, n+6>   
 [3] System.Web.UI.WebControls.Button.OnClick (System.EventArgs e) <il+33, n+112>   
 [4] System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String eventArgument) <il+49, n+111>   
 [5] System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) <il+7, n+11>   
 [6] System.Web.UI.Page.RaisePostBackEvent (System.Web.UI.IPostBackEventHandler sourceControl, System.String eventArgument) <il+7, n+14>   
 [7] System.Web.UI.Page.RaisePostBackEvent (System.Collections.Specialized.NameValueCollection postData) <il+21, n+37>   
 [8] System.Web.UI.Page.ProcessRequestMain (System.Boolean includeStagesBeforeAsyncPoint, System.Boolean includeStagesAfterAsyncPoint) <il+1462, n+1566>   
 [9] System.Web.UI.Page.ProcessRequest (System.Boolean includeStagesBeforeAsyncPoint, System.Boolean includeStagesAfterAsyncPoint) <il+60, n+132>   
 [10] System.Web.UI.Page.ProcessRequest () <il+20, n+81>   
 [11] System.Web.UI.Page.ProcessRequestWithNoAssert (System.Web.HttpContext context) <il+13, n+22>   
 [12] System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) <il+57, n+50>   
 [13] ASP.agents_callerdetails_aspx.ProcessRequest (System.Web.HttpContext context) <il+7, n+5>   
 [14] System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () <il+285, n+182>   
 [15] System.Web.HttpApplication.ExecuteStep (System.Web.HttpApplication+IExecutionStep step, System.Boolean& completedSynchronously) <il+21, n+76>   
 [16] System.Web.HttpApplication+ApplicationStepManager.ResumeSteps (System.Exception error) <il+244, n+307>   
 [17] System.Web.HttpApplication.ResumeStepsFromThreadPoolThread (System.Exception error) <il+19, n+37>   
 [18] System.Web.HttpApplication+AsyncEventExecutionStep.ResumeStepsWithAssert (System.Exception error) <il+12, n+40>   
 [19] System.Web.HttpApplication+AsyncEventExecutionStep.OnAsyncEventCompletion (System.IAsyncResult ar) <il+83, n+132>   
 [20] System.Web.HttpAsyncResult.Complete (System.Boolean synchronous, System.Object result, System.Exception error, System.Web.RequestNotificationStatus status) <il+56, n+62>   
 [21] System.Web.SessionState.SessionStateModule.PollLockedSessionCallback (System.Object state) <il+118, n+361>   
 [22] System.Threading._TimerCallback.TimerCallback_Context (System.Object state) <il+24, n+47>   
 [23] System.Threading.ExecutionContext.runTryCode (System.Object userData) <il+41, n+81>   
 [24] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup (System.Runtime.CompilerServices.RuntimeHelpers+TryCode code, System.Runtime.CompilerServices.RuntimeHelpers+CleanupCode backoutCode, System.Object userData) <il+-1, n+0>   
 [25] System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <il+66, n+103>   
 [26] System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <il+104, n+69>   
 [27] System.Threading._TimerCallback.PerformTimerCallback (System.Object state) <il+57, n+107>  

0 个答案:

没有答案