Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
Hi,
On the web server we get this error by w3wp.exe (observer in application system event log) - it causes system level exception. So the application does not work after that.

Error Trace


Faulting application w3wp.exe, version 6.0.3790.3959, faulting module kernel32.dll, version 5.2.3790.4480, fault address 0x0000bef7.<br />
Exception: System.AccessViolationException<br />
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.<br />
StackTrace:    at OSGeo.MapServer.mapscriptPINVOKE.new_mapObj(String jarg1)<br />
   at OSGeo.MapServer.mapObj..ctor(String filename)<br />
   at PostGreSQLServerSpatialQuery.GetKMLByPolygon(String[] oBoundingBox);<br />

So it is found that in one of the modules it throws this exception.
How can I make sure that even if the System.AccessViolationException exception occurs application keep on working.For now I have added the code snippet which can cause this exception in a try catch block and I exit from the function where it it causes the exception
as
(The code is in a web service)
function ...

     try
       try
          code which can cause exception
      catch
         exit function;
       end try
catch ex as exception
finally
end try
end function


here I am preventing the exception to go to next level.
Do you think this is the right approach where even if it caused System
AccessViolationException the application will still be working.
Do you have any better approach?

Thanks
Vijay
Posted
Updated 24-Nov-10 9:06am
v2
Comments
aidin Tajadod 24-Nov-10 15:10pm    
Have you tried global.asax?
Shahriar Iqbal Chowdhury/Galib 24-Nov-10 15:13pm    
Hi,
you can find this post useful.
http://vspug.com/martinnr5/2008/10/01/troubleshooting-quot-faulting-application-w3wp-exe-quot-pt-1/

1 solution

I have the similar problem (but with a different error).
I used windows debug tools to solve it.

It is not a simple thing, may be the following link will be helpful.

http://forums.asp.net/t/980750.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900