SUMMARY
This step-by-step article describes how to monitor errors in
.NET-connected applications. The .NET-connected applications log errors in
several different ways. Errors that occur in the .NET Framework itself are
logged to the Application Event Log. For example, when ASP.NET recycles an
application that exceeds the specified memory usage, an event is logged to the
Application Event Log that details the quantity of memory that is
consumed.
Most events that occur in an application are also logged to
the Application Event Log. However, whether the event is logged or not logged
is dependant on the application developer. ASP.NET applications frequently rely
on the system administrator to parse the HTTP logs to identify HTTP
500 error codes. These error codes identify application failures.
Instead of manually monitoring event logs and HTTP logs, administrators can use
the Performance snap-in to detect when errors occur.
back to the topView .NET Framework Errors by Using the Event Viewer
Any type of .NET-connected application, such as Microsoft Windows
applications, Web services, and Web applications, can add events to the
Application Event Log. You can monitor the Application Event Log to identify
and to troubleshoot errors. To view .NET Framework errors by using the Event
Viewer, follow these steps:
- On the taskbar, click start, point to
Settings, and then click Control
Panel.
- Double-click the Administrative Tools
folder and then double-click to run the Event Viewer
tool.
- In the left pane, select the Application
Log.
- On the View menu, select
Filter.
The Application Log Properties
dialog box appears. The Filter tab is selected. - To view events that are created by the .NET Framework,
select .NET Runtime from the Event Source
drop-down list. To view events that occurred in ASP.NET, select
ASP.NET.
- To view the filtered Application Event Log, click
OK.
- Double-click any event in the right pane to view detailed
information about that event.
back to the
topView ASP.NET Errors Located in HTTP Logs
An error may occur in ASP.NET that the application cannot handle.
In this case, Internet Information Server (IIS) logs the request and the
response code in the HTTP logs. These logs do not contain a detailed
description of the type of error that occurred. However, the log does contain
information about the time of the request, the page requested, and the user who
issued the request. This information permits you to reproduce and to isolate
the error.
By default, HTTP logs are stored as text files in
subfolders of the \%SystemRoot%\system32\LogFiles\W3SVC#\ folder. While there
is no graphical tool that you can use to view the errors that are contained in
HTTP logs, there are third-party applications that can analyze IIS log files.
When you interactively troubleshoot ASP.NET error messages, you can
use trace capabilities to gather more detailed information about the failed
requests.
back to the
topMonitor Errors in Real Time
ASP.NET Web applications that experience problems may not add
events to the event log. In this case, you will find it difficult if you try to
track those problems by parsing HTTP logs. You can use the Performance snap-in
to monitor for ASP.NET errors in real time. To monitor ASP.NET errors by using
the Performance snap-in, follow these steps:
- On the taskbar, click start, point to
Settings, and then click Control
Panel.
- Double-click the Administrative Tools
folder and then double-click to run the Performance
tool.
- Select System Monitor in the left
pane.
- In the right pane, click Add on the
toolbar.
- In the Performance Object drop-down list,
click ASP.NET Applications.
- Select Errors Total from Select
Counters From List.
- Under Select Instances From List, select
the application that you want to monitor or select Total to
monitor all applications.
- Click Add and then click
Close.
The
Errors Total counter keeps a running total
of ASP.NET errors. You can use this counter to detect problems that must be
investigated.
back to the
top