[How Do I:] Write Web Events to a SQL Server Database Using the SqlWebEventProvider

by Chris Pels

In this video Chris Pels shows how to use the ASP.NET health monitoring SqlWebEventProvider to log errors in a web site to a SQL Server database. First, learn the role of the provider and events in ASP.NET health monitoring. Next, see how to configure a SQL Server database with the necessary objects for recording health monitoring events using the aspnet_regiis utility, the same utility used to configure ASP.NET Membership. Then, learn how to configure health monitoring in the web.config file to record events in an ASP.NET web site to the newly created SQL Server database. As part of this configuration, see how the root web.config file in the .NET Framework 2.0 has both providers and events defined that can be leveraged when configuring your health monitoring. These fundamentals are a base upon which custom events can be created that log your own specific information to a SQL Server database in an ASP.NET web site.

▶ Watch video (31 minutes)