Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

does someone know how to write proper XPath query for filtering certain application pool errors in Windows 2008 R2 Event log ("Applications" section)?

EventData in XML view from Application eventlog does not containt data descriptions:

Event from Application:

- <EventData>
  <Data>An unhandled exception has occurred.</Data> 
  <Data>2011-04-30 13:53:42</Data> 
  <Data>2011-04-30 11:53:42</Data> 

Event from Security:

  <Data Name="TargetUserSid">S-1-5-21-775773886-3418497561-2363255987-1293</Data> 
  <Data Name="TargetUserName">someusername</Data> 
  <Data Name="TargetDomainName">servername</Data> 

Does anyone have any idea how to write XPath query (I want to create custom view) to filter event log entries from Application section which contains certain applicationpool username (in this example it is "SERVERNAME\usernamefromwebsiteapplicatiopool").

Thank you

share|improve this question
up vote 0 down vote accepted

I've solved my problem:

 <Query Id="0" Path="Application">
  <Select Path="Application">*[EventData[(Data[17]='SERVERNAME\applicationpoolname')]]</Select>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.