Skip to Content
Nov 04, 2011 at 05:09 PM

W3WP.exe crash with Access Violation on RptDoc.Close



We have a web application that also lets the users run many different reports. We are using Crystal Report for Vs2010 Sp1 setup on a Windows 2008 R2. The IIS web site is configured to run in 64-bit mode.

To dispose the report we have a Timer on the server that validates if the report is still opened on the client. To know if the report is still open we have a CallBack function on our Report Viewer page that pings the server. When the page stops pinging the server we know that the report can be closed and disposed.

Here is the code for report closing and disposing:

         If Not Me.RptDoc() Is Nothing Then
            Me.RptDoc = Nothing
         End If
      Catch ex As System.Threading.ThreadAbortException
         Throw ex
      Catch ex As System.Exception
         'To Avoid thread crash on error
      End Try

From time to time when doing RptDoc.Close an access Violation happens that kills the W3WP.exe process. Even if we have a Try...Catch statement it does not seem to be able to catch the error and avoid the W3WP.exe from crashing.

Is there a way to avoid this issue?

Thank you.