Logging and Systems Management in Microsoft .NET Framework Application Development Foundation
- By Tony Northrup
Real-world applications, especially those deployed in IT environments, must be manageable. Making an application manageable involves allowing systems administrators to monitor and troubleshoot the application. The .NET Framework provides the Systems.Diagnostics namespace to allow you to write events to the event log, create debug and trace information, and provide performance counters.
IT departments also regularly need internal tools that analyze computer status or respond to changes in the operating system. Windows Management Instrumentation (WMI) provides these capabilities, and the .NET Framework provides a useful WMI interface.
Exam objectives in this chapter:
Manage an event log by using the System.Diagnostics namespace.
Manage system processes and monitor the performance of a .NET Framework application by using the diagnostics functionality of the .NET Framework.
Debug and trace a .NET Framework application by using the System.Diagnostics namespace.
Embed management information and events into a .NET Framework application.
Lessons in this chapter:
Lesson 1: Logging Application State
Lesson 2: Working with Performance Counters
Lesson 3: Managing Computers
Before You Begin
This book assumes that you have at least two to three years of experience developing Web-based, Microsoft Windows–based, or distributed applications using the .NET Framework. Candidates should have a working knowledge of Microsoft Visual Studio. Before you begin, you should be familiar with Microsoft Visual Basic or C# and be comfortable with the following tasks:
Creating Console and Windows Presentation Foundation (WPF) applications in Visual Studio using Visual Basic or C#
Adding namespaces and system class library references to a project
Running a project in Visual Studio