开发者

When and why threading TimerCallback is triggered?

开发者 https://www.devze.com 2022-12-22 10:16 出处:网络
We have an asp.net application running on IIS6 with .net 2.0 (XP) that call开发者_如何学Gos a web service in a button click event. It would take over 30 mins for web service to finish. But somehow aft

We have an asp.net application running on IIS6 with .net 2.0 (XP) that call开发者_如何学Gos a web service in a button click event. It would take over 30 mins for web service to finish. But somehow after a certain period of time, usually between 20 ~ 30 mins, asp.net did another postback of button click event which cause problem in our application.

The track stack (see below) shows that postback was triggered by Threading.TimeCallback. Does anyone know why? or anything related to IIS setting?

Appreciated! Michael

at ASP.platform_workflow_executeworkflow_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.ResumeStepsFromThreadPoolThread(Exception error) at System.Web.HttpApplication.AsyncEventExecutionStep.ResumeStepsWithAssert(Exception error) at System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) at System.Web.HttpAsyncResult.Complete(Boolean synchronous, Object result, Exception error, RequestNotificationStatus status) at System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._TimerCallback.PerformTimerCallback(Object state)


Could be a problem with the session timing out. Increasing the session timeout period could solve the problem.

However, with an operation running that long it might be better considering the WebService asynchronously and providing some information to the user while the process is running.

0

精彩评论

暂无评论...
验证码 换一张
取 消