views:

92

answers:

3

In an asp.net application, we'd like to use the SqlWebEventProvider to log any Event that occurs during the application lifetime.

The problem is that we think that the table aspnet_WebEvent_Event doesn't provide enough columns and should log more information (we need to keep the Logged user).
I'm aware that this information could be stored in the "Details" column but it wouldn't then be really simple to filter the results and build reports.

So I'm searching for a simple solution to add a column. I wish I could derive SqlWebEventProvider but the methods used to build the stocked procedure parameters are private (PrepareParams() and FillParams()).

Any simple solution that doesn't imply to rewrite the entire Provider class ?

A: 

Hi, Did you ever figure out if you can add columns with SqlWebEventProvider. I would like to do the same thing. Thanks. Kim

Kim
Sorry... Found nothing about that. The only solution is to recreate another aspnet_WebEvent_Events
Julien N
A: 

After a lot of searching it seems that it is not possible without inheriting from the existing SqlWebEventProvider and overriding the methods properly to insert the values.

You can look into the .NET Framework code to check for the current implementation with .Net Reflector

Julien N
+1  A: 

Instead of adding columns to the SqlWebEventProvider and it's table default schema, you may consider creating your own WebEventProvider that logs events to a database of your own schema.

Here is an introductory reference on how to do so. http://bit.ly/2fXeuH

cecilphillip