views:

432

answers:

2

What can be the reason of the following exception in ASP.NET application under IIS 7? It is an unhandled exception that restarts the whole application.

Exception: System.AccessViolationException

Message: Attempted to read or write protected memory. This is often an indication that other memory has been corrupted.

StackTrace:

   in System.Web.Hosting.UnsafeIISMethods.MgdIsLastNotification(IntPtr pRequestContext, RequestNotificationStatus dwStatus)
   in System.Web.HttpRuntime.FinishRequestNotification(IIS7WorkerRequest wr, HttpContext context, RequestNotificationStatus& status)
   in System.Web.HttpRuntime.OnRequestNotificationCompletionHelper(IAsyncResult ar)
   in System.Web.HttpRuntime.OnRequestNotificationCompletion(IAsyncResult ar)
   in System.Web.HttpAsyncResult.Complete(Boolean synchronous, Object result, Exception error, RequestNotificationStatus status)
   in System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
   in System.Web.HttpApplication.ResumeStepsWaitCallback(Object error)
   in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   in System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
   in System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

[UPD]

System: Windows Web Server 2008 64-bit.

Application details: ASP.NET application that doesn't use pages architecture. It process requests using custom http sync and async handlers. There are also parallel threads from ThreadPool or created by Thread class are running.

A: 

A third-party ISAPI filter may cause this problem.

AnthonyWJones
Thanks for your answer.I don't use any third-party filter. Pure ASP.NET application.
alexey
A: 

A hardware error is occasionally the unexpected culprit in such cases. Everything may work perfectly, except one little method in one obscure DLL.

Or does this happen on multiple machines, as well? Try a different one.

Sander