views:

713

answers:

0

I have a WCF service which is secured with username and password (using SqlMembershipProvider). I'd like to log EVERY (succeeded and failed) login attempt to this service and save user credentials to the database using Logging Application Block. When I turn on WCF logging and trace it with Logging Application Block, i get something like this (about 100 of this logs for one login attempt):

Timestamp: 6/5/2009 12:03:01 PM
Message: <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Start"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ActivityBoundary.aspx&lt;/TraceIdentifier&gt;&lt;Description&gt;Activity boundary.</Description><AppDomain>IX.Services.Host.vshost.exe</AppDomain><ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/DictionaryTraceRecord"&gt;&lt;ActivityName&gt;Execute 'Services.Contracts.ILoginService.Login'.</ActivityName><ActivityType>ExecuteUserCode</ActivityType></ExtendedData></TraceRecord>
Category: System.ServiceModel
Priority: 2147483647
EventId: 131085
Severity: Start
Title:
Machine: PC204
Application Domain: Services.Host.vshost.exe
Process Id: 7864
Process Name: D:\..\Services.Host.vshost.exe
Win32 Thread Id: 6392
Thread Name: 
Extended Properties: TraceEventCache - System.Diagnostics.TraceEventCache

I cannot find any useful information from this logs (namely user credentials). So, my question is: how can i log user credentials from WCF services to the database using Logging Application Block?

Thanks in advance for your answer!