473,503 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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)

Thanks,
Ryan

<--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
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<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"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings/>
<system.web>
<!--
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.
-->
<authorization>
<allow roles="Administrator"/>
</authorization>
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<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"/>
</namespaces>
</pages>

<authentication mode="Forms"/>
<membership defaultProvider="MyMembershipProvider">
<providers>
<add name="MyMembershipProvider"
type="System.Web.Security.SQLMembershipProvider"
connectionStringName="ConnOne"/>
</providers>
</membership>
<roleManager enabled="true" defaultProvider="MyRoleProvider">
<providers>
<add connectionStringName="ConnOne" name="MyRoleProvider"
type="System.Web.Security.SQLRoleProvider"/>
</providers>
</roleManager>
<!--
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"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<healthMonitoring>
<bufferModes>
<add name="Extra Critical Notification"
maxBufferSize="10"
maxFlushSize="5"
urgentFlushThreshold="1"
regularFlushInterval="Infinite"
urgentFlushInterval="00:01:00"
maxBufferThreads="1"/>
</bufferModes>
<providers>
<add connectionStringName="eventConn" name="MyWebEventProvider"
maxEventDetailsLength="1073741823" buffer="true" bufferMode="Extra
Critical Notification"
type="System.Web.Management.SqlWebEventProvider"/>
</providers>
<rules>
<add name="Password Change Event" eventName="Password Change
Event" provider="MyWebEventProvider" minInterval="00:00:01"/>
</rules>
<eventMappings>
<add name="Password Change Event"
type="CustomWebEvents.CustomWebEvents.PasswordChan gedEvent,
CustomWebEvents"/>
</eventMappings>
</healthMonitoring>
</system.web>
</configuration>

Jan 27 '07 #1
1 2042
Sorry for the accidental double double post...

Jan 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5374
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
0
1826
by: Søren Lund | last post by:
Hello, I have implemented a custom config section handler by implementing the IConfigurationSectionHandler interface. I have registered this handler in web.config and everything works fine ......
0
5886
by: Adam Getchell | last post by:
I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm I looked at http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996, but it doesn't...
3
1836
by: gaugust | last post by:
I am running Visual Studio .Net 2003 with Windows XP Pro and SP2. I am tying to run an ASP .Net application in debug mode. In Web.Config file I have set debug="true" but I am getting an error:...
1
1024
by: JIM.H. | last post by:
Hello, The following error message appears from time to time while I am working on my application. What might be wrong? Thanks, Error: Server Error in '/' Application...
0
357
by: Ryan | last post by:
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...
0
1581
by: BrianKer | last post by:
Hi! It's my first discussion on this forum. First I have a exe like this below (the object can invoke by console) public class DynamicLoad { public Type AssemblyType = null; ...
4
3305
by: Frank Aune | last post by:
Hello, I've been playing with the python logging module lately, and I manage to log to both stderr and MySQL database. What I'm wondering, is if its possible to specify the database handler in...
3
6385
by: Lowell Alleman | last post by:
Here is the situation: I wrote my own log handler class (derived from logging.Handler) and I want to be able to use it from a logging config file, that is, a config file loaded with the...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5586
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.