Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

.NET 4 with EventLog dumps entire log

$
0
0

My app has the following code to capture security event logs

Dim SecobjLog As EventLog = New EventLog("Security")
AddHandler SecobjLog.EntryWritten, AddressOf SecurityLog_OnEntryWritten
SecobjLog.EnableRaisingEvents = True

Sub SecurityLog_OnEntryWritten(ByVal [source] As Object, ByVal e As EntryWrittenEventArgs)
'--- Process Logs
End Sub

This code has been working for years.   When a new security event is generated on the server, the .EntryWritten function fires and my program processes it.  However, I recently upgraded my app to use .NET 4.0 and something went wrong.  Now, at seemingly random intervals, the ENTIRE security log is captured.  At over 100,000 logs, you can see where my program would have some issues.   Why is the .EntryWritten function in VB dumping the entire security log?   It should only be dumping the latest logs as they happen.

I have tried this with .NET 4.0 and .NET 4.5 and both seem to have this issue.  If I go back to using .NET 3.5, everything works fine again.  What changed?

Does anyone have any idea why this is happening?





"MC"


Viewing all articles
Browse latest Browse all 8156

Trending Articles


Practice Sheet of Right form of verbs for HSC Students


Sarah Samis, Emil Bove III


ZARIA CUMMINGS


Need radio code for IVECO Delphi Aptiv FJ5 RBT M16


Black Angus Grilled Artichokes


Ed Sheeran – Sapphire – Pre-Single [iTunes Plus M4A]


Sunny Garcia’s Ex-Wife Colleen McCullough


99 God Status for Whatsapp, Facebook


Funeral of Sir Warwick Franklin


MHDD



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>