防止出现故障w3wp.exe进程异常 [英] preventing exception to fault w3wp.exe process

查看:76
本文介绍了防止出现故障w3wp.exe进程异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在Web服务器上,我们通过w3wp.exe(应用程序系统事件日志中的观察者)收到此错误-它导致系统级异常.因此,此后该应用程序将无法运行.

错误跟踪


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 />


因此发现在其中一个模块中它会引发此异常.
我如何确保即使发生System.AccessViolationException异常,应用程序仍可以继续工作.现在,我已经添加了可以在try catch块中导致此异常的代码段,并且退出了导致异常的函数

(代码在Web服务中)


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



在这里,我阻止了进入下一级别的异常.
您是否认为这是正确的方法,即使它导致了系统
AccessViolationException该应用程序仍将运行.
您有更好的方法吗?

谢谢
Vijay



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

推荐答案

我有类似的问题(但有不同的错误).
我使用Windows调试工具来解决它.

这不是一件简单的事情,可能以下链接会有所帮助.

http://forums.asp.net/t/980750.aspx [
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[^]


这篇关于防止出现故障w3wp.exe进程异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆