Iis – How to filter Event Viewer down to errors from a single website

eventvieweriiswindows-event-logwindows-server-2008-r2

I have used Event Viewer to create a custom view of all ASP.net errors by using the GUI as below

filter to asp.net errors

How do I create custom views for a single website?

Best Answer

By going to the XML tab, there is a more detailed filter function. Add to the existing terms so that events only appear if the Application Path is mentioned. For example, if your events contain the information Application Path: C:\inetpub\application-1\ you would alter the query to be:

<QueryList>
  <Query Id="0" Path="Application">
    <Select Path="Application">
      *[System[(EventID=1309) and TimeCreated[timediff(@SystemTime) &lt;= 604800000]]] 
      and
      *[EventData[Data and (Data="C:\inetpub\application-1\")]]
    </Select>
  </Query>
</QueryList>