1

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

It states:

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.

4 Answers 4

3

Your app crashed on an unhandled exception. The Watson log won't be good enough to find the cause. Write an event handler for the AppDomain.CurrentDomain.UnhandledException event, have it write e.ExceptionObject.ToString() to the event log so you'll get a good stack trace that shows you why and where it bombed.

Sign up to request clarification or add additional context in comments.

Comments

1

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

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.

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.

9 Comments

Yep.. it's an application the connects to server 1, gets an XML file.. then connects to a MS reporting service getting some reports and finally connects to server 3 where it sends some generated files
Could it be that the reports it's fetching are taking longer than the web-service client will wait for, and is timing out?
Yep it could be the reason.. but I don't understand it.. as I've got this piece of code in try catch clause
In that case it's not that piece of code causing the exception - unless you're rethrowing it. Surround the contents of your main method in a try/catch, and handle the exceptions in a more useful way - such as writing the stacktrace to a file on the machine.
Ah you mean to surround the whole code with try catch.. I suppose you mean just for debugging purposes.. (otherwise it would be a try catch project :D )
|
1

It looks like an unhandled exception. If it's being generated in an web application or service you can try putting an global exception handler in your global.asax file. See here for an example. You can trap the error and output some better information to the event log.

5 Comments

As far as I can tell from the error log, it's a .exe, therefore a Windows application, not a web application.
The problem is that the application is a console application being started by the system scheduler
@Andy.. correct Andy.. its an .exe residing directly on the machine
If it's a web exception being generated in a Windows application then you should be able to wrap the call to the web method with a Try..Catch block and write the details of the exception to the event log or a log file.
Not sure why I got the -1. .NET runtime errors can occur in w3wp.exe, the IIS worker process, when an unhandled exception occurs in a ASPX application. For example, one that I've taken from the Application event log on one of my web servers: EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 rtbase, P5 1.0.0.0, P6 4909e67b, P7 61, P8 321, P9 pe.pexception, P10 NIL.
1

Here is the simple explanation from your event log entry

P4 system.web.services -  module that was throwing the exception 
P9 system.net.webexception  - Exception Type
P8 65 - IL Offset where the exception was thrown

These are Watson bucket for getting the call-stack of the exception. From .NET 2.0 onwards Watson reports have this information.

Here is the MSDN article for above explanation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.