Parallel Reading from Security Event Log fails on Windows XP 32 Bit - by Alois

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 410402 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/2/2009 10:29:58 PM
Access Restriction Public


When I read from Windows Event Log in parallel (to speed up reading) I get from the Security Event Log exceptions of the form:
Required Privilege not held and other stuff.
Sign in to post a comment.
Posted by Microsoft on 2/18/2009 at 1:55 PM
Hi Alois1,

I'm not able to reproduce the issue with reading from the Security log on the Windows XP. I've run the app you produced on my local XP machine for about a day and haven't run into the Exception.

With respect to the other issue you brought up where accessing the Entries array sometimes throws an ArgumentException it is possible for that to happen due to a race where the data in the event log can change between when you get the count parameter and when you index into the array. To work around this issue I'd recommend that you use the Enumerator on the EventLogEntriesCollection to get at entries. While this isn't as straight forward as the indexer the code paths there shouldn't throw (HasNext() would return false).

If you're able reproduce the issue where you get an InvalidOperationException please re-active this issue or shoot me an email and I'll try to work with you to get some more information to help me investigate what's going on here. My e-mail address is matell (at) microsoft (dot) com

Thanks again for contacting us. Hopefully this workaround works for you.

Matt Ellis
SDE, Base Class Libraries
Posted by Microsoft on 2/3/2009 at 6:53 PM
Thanks for your feedback.

We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team