ASP.NET 2.0 System.AccessViolationException in Event Viewer

Viewed 243

An application compiled under .NET 2.0 running under IIS in its own app pool is crashing and causing the app pool to stop. The Event Viewer is giving the below details:

Application ID: /xx/xxxx/1/ROOT/my_application_name_here
Process ID: 6600

Exception: System.AccessViolationException

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

StackTrace:    at b(oa* , PBTransaction , Boolean )
   at c(oa* , PBTransaction )
   at Sybase.PowerBuilder.DB.PBSQL.Stop(IntPtr dbthis, PBTransaction transaction)
   at Sybase.PowerBuilder.PBSessionBase.StopTransaction(PBTransaction trans)
   at Sybase.PowerBuilder.PBTransaction.Dispose(Boolean disposing)
   at Sybase.PowerBuilder.PBPowerObject.Finalize()

The application in question is an ASMX web service built in Power Builder. The stack trace doesnt go any further. If i capture the same error in Debug Diagnostic Analyser, it gives the following additional memory details:

enter image description here

What could be the underlying error here? Are there any ways to find more information about this issue?

Edit: I have since disabled Rapid Fail Protection and the app pool doesnt stop upon crash. But still want to get to the bottom of the error

3 Answers

Try to set the application pool managed pipeline mode Integrated to Classic and make sure it is using the .net version 2.0.

enter image description here

This error should not happen in the managed code. This might solve the issue:

Go to Visual Studio Debugger to bypass this exception:

Tools menu ->Options -> Debugging -> General -> Uncheck this option "Suppress JIT optimization on module load"
Related