如何调试.NET错误记录在事件查看器? [英] How to debug .NET error logged in an Event Viewer?

查看:390
本文介绍了如何调试.NET错误记录在事件查看器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我发现我的应用程序会导致一些错误,这是记录在一个事件日志

Hi I found out that my application causes some errors which are logged in an Event log.

它指出:

NET Runtime 2.0 Error 

    EventType clr20r3, P1 *****.exe, P2 1.0.0.0, P3 4b2a572f, P4 system.web.services, P5 2.0.0.0, P6 4889df18, P7 bc, P8 65, P9 system.net.webexception, P10 NIL.

我如何能找出这是怎么回事?我已经试过了本地应用程序,一切工作正常。

How can I find out what's going on? I've tried that app locally and everything works fine.

推荐答案

你能描述更多的应用程序是类型?它在做什么,是否采用交互式或非交互式?

Can you describe more about the type of application it is? What it's doing, is it interactive or non-interactive?

实际的错误是 system.net.webexception - 这是某种形式的问题,一个网页或网页服务进行通信。这本身就表明,它可能会,如果它正常工作时,你试试吧一个间歇性错误。

The actual error is system.net.webexception - which is some form of problem communicating with a web-page or web-service. This in itself suggests it might an intermittent error if it works fine when you try it.

如果不是这样,什么是配置错误时,它的远程运行 - 一些不同的东西,以您的环境。例如,你用一个内部DNS条目时,该应用程序是远程运行的,这不是用?

Either that or something is misconfigured when it's running remotely - something different to your environment. For example, do you use an internal DNS entry that's not available when the application is run remotely?

您将要赶在应用程序中所有的异常(如整体尝试{}赶上{} 法),并记录异常到一个文件,或者把它发邮件给他们自己,这样你就可以更详细地什么存在的见。

You will want to catch all exceptions in your application (like an overall try { } catch { } in your main method) and log the exceptions to a file, or get it to e-mail them to yourself, so you can see in more detail what's occuring.

这篇关于如何调试.NET错误记录在事件查看器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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