By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

Web.Config File - logging custom events in SQL Server.

P: n/a
I am trying to log events to SQL Server instead of the computers event
log, but, although I get no errors, I have no luck. The
webevents_events table is empty. I have a custom event that I am
raising (passwordchange), and can see it beign raised
successfully...just it seems to go nowhere. I have run aspnet_regsql
to setup the database to handle event recording. I am fairly sure I am
missing something in my web.config file. (I would like ALL
login/password related events to be logged in SQL server if possible).
Can anyone tell me what why my sight is not recording any activity in
SQL? (SOME non-custom events are being stored in my event logs...not
SQL Server)


<--web.config file-->

<?xml version="1.0"?>
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
<add name="ConnOne" connectionString="Data Source=myserver;Integrated
Security=True;Initial Catalog=aspnetdb"/>
<add name="ConnTwo" connectionString="Data Source=myserver;Initial
Catalog=SRUTPL;Integrated Security=True"
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
The <authenticationsection enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
<allow roles="Administrator"/>
<compilation debug="true" strict="false" explicit="true"/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
<add namespace="CustomWebEvents"/>

<authentication mode="Forms"/>
<membership defaultProvider="MyMembershipProvider">
<add name="MyMembershipProvider"
<roleManager enabled="true" defaultProvider="MyRoleProvider">
<add connectionStringName="ConnOne" name="MyRoleProvider"
The <customErrorssection enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly"
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
<add name="Extra Critical Notification"
<add connectionStringName="eventConn" name="MyWebEventProvider"
maxEventDetailsLength="1073741823" buffer="true" bufferMode="Extra
Critical Notification"
<add name="Password Change Event" eventName="Password Change
Event" provider="MyWebEventProvider" minInterval="00:00:01"/>
<add name="Password Change Event"
type="CustomWebEvents.CustomWebEvents.PasswordChan gedEvent,

Jan 27 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Sorry for the accidental double double post...

Jan 27 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.