all groups > visual studio .net enterprise tools > january 2005 >
You're in the

visual studio .net enterprise tools

group:

EIF Config filters not recognizing the Event Types


EIF Config filters not recognizing the Event Types Raj
1/14/2005 7:13:05 AM
visual studio .net enterprise tools:
Iam trying to send EventTypes
Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent to one table and
send EventTypes Microsoft.ApplicationBlocks.Logging.Schema.AuditMessageEvent
to a different table.
When I use a filter as below, it doesnt log anything for AdminMessageEvent
..........................
<eventSourceRef name="Application">
<filterRef name="defaultApplicationElementFilter" />
</eventSourceRef>
..........................
<filter name="defaultApplicationElementFilter" description="A default
filter for the Application event sources.">
<eventCategoryRef name="Admin Events">
<eventSinkRef name="sqlSink" />
</eventCategoryRef>
</filter>
..........................
<eventCategories>
<eventCategory name="Admin Events" description="This event category
contains Admin Event Types">
<event
type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e57d9cc0f060bdb9" />
</eventCategory>
<eventCategories>
..........................

but when I use something as below, it logs in the table

..........................
<eventSourceRef name="Application">
<filterRef name="defaultApplicationElementFilter" />
</eventSourceRef>
..........................
<filter name="defaultApplicationElementFilter" description="A default
filter for the Application event sources.">
<eventCategoryRef name="All Events">
<eventSinkRef name="sqlSink" />
</eventCategoryRef>
</filter>
..........................
<eventCategories>
<eventCategory name="All Events" description="This event category
contains Admin Event Types">
<event
type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e57d9cc0f060bdb9" />
</eventCategory>
<eventCategories>
..........................

Seems like its not able to find the event type properly even though its set
correctly and when I use a debugger, I find the message generated as below
which has the Event Type defined correctly

<?xml version="1.0" encoding="utf-8" standalone="yes"?><event:LogEvent
xmlns:event="urn:2B9EF1B7-CBEC-4da3-9443-BF4C701DAEA7"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent"
id="553b948c-3596-4d53-9528-caa797e76486"><event:NameValuePair name="Message"
value="Admin Message Event to be published" /><event:NameValuePair
name="ApplicationName" value="-Null-" /><event:NameValuePair
name="EventSourceInstance" value="cf49fd4d-254c-44ec-85bc-216438df184a"
/><event:NameValuePair name="EventId"
value="553b948c-3596-4d53-9528-caa797e76486" /><event:NameValuePair
name="EventSourceName" value="Application" /><event:NameValuePair
name="EventSequenceNumber" value="1" /><event:NameValuePair
name="EventSchemaVersion" value="1.0.0.0" /><event:NameValuePair
name="TimeStamp" value="12/29/2004 5:51:03 PM" /><event:NameValuePair
name="AppDomainName" value="BasicSqlSinkSample.exe" /><event:NameValuePair
name="MachineName" value="JOSEPH" /><event:NameValuePair
name="RootRequestName" value="" /><event:NameValuePair
name="RootRequestInstance" value="" /><event:NameValuePair
name="RequestInstance" value="" /><event:NameValuePair name="RequestName"
value="" /><event:NameValuePair name="RequestSequenceNumber" value="0"
/><event:NameValuePair name="EventLogEntryTypeID" value="4"
/><event:NameValuePair name="PopulatingEventInfoForFirstTime" value="False"
/><event:NameValuePair name="ApplicationLogLevel" value="2"
/><event:NameValuePair name="EventPublishLogLevel" value="1"
/><event:NameValuePair name="FormatterName" value="-Null-" /></event:LogEvent>


Any thoughts?
Thanks
RE: EIF Config filters not recognizing the Event Types Raj
1/17/2005 10:25:01 AM
Mike,
The GAC was having a older version of App Block dll and once i
regschema/segsinks the newer version one, it works great. It would have been
great if there was any error thrown in the windows event viewer.Thanks a lot
for your response.
Just curious, is there any efficient way to debug the events once published
into the EIF framework?Iam trying to debug when the XSLT transformation
happens and when it tries to insert the data in the database
Thanks again
Raj

[quoted text, click to view]
RE: EIF Config filters not recognizing the Event Types Raj
1/17/2005 11:23:02 AM
Thanks Mike,that helps

[quoted text, click to view]
RE: EIF Config filters not recognizing the Event Types mikehayt_ NO[at]SPAM online.microsoft.com
1/17/2005 6:13:57 PM
Hi there

I think you are right in your analysis - its not thinking the event you are
raising is the one specified as

Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=e57d9cc0f060bdb9


Can you try writing a small app to create an instance of a
Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent and output its
types fullName

e.g.

using System;
using Microsoft.ApplicationBlocks.Logging.Schema;

public class A
{
public void Main(string [] args)
{
AdminMessageEvent a = new AdminMessageEvent();
Console.WriteLine(a.GetType().FullName);
}
}

and compare this string to the one in the EI.config file?

You might also want to make sure that there is only one
Microsoft.ApplicationBlocks.Logging.Schema.dll in the GAC (using
gacutil.exe) and uninstall it and reinstall your one to ensure that you're
certain of the version of Microsoft.ApplicationBlocks.Logging.Schema thats
in the GAC.

Also you can check the Windows Event Log to see if EIF has reported any
errors.

Hope this helps

Mike


--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
| Iam trying to send EventTypes
| Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent to one table
and
| send EventTypes
Microsoft.ApplicationBlocks.Logging.Schema.AuditMessageEvent
| to a different table.
| When I use a filter as below, it doesnt log anything for AdminMessageEvent
| .........................
| <eventSourceRef name="Application">
| <filterRef name="defaultApplicationElementFilter" />
| </eventSourceRef>
| .........................
| <filter name="defaultApplicationElementFilter" description="A default
| filter for the Application event sources.">
| <eventCategoryRef name="Admin Events">
| <eventSinkRef name="sqlSink" />
| </eventCategoryRef>
| </filter>
| .........................
| <eventCategories>
| <eventCategory name="Admin Events" description="This event category
| contains Admin Event Types">
| <event
| type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
| Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0,
Culture=neutral,
| PublicKeyToken=e57d9cc0f060bdb9" />
| </eventCategory>
| <eventCategories>
| .........................
|
| but when I use something as below, it logs in the table
|
| .........................
| <eventSourceRef name="Application">
| <filterRef name="defaultApplicationElementFilter" />
| </eventSourceRef>
| .........................
| <filter name="defaultApplicationElementFilter" description="A default
| filter for the Application event sources.">
| <eventCategoryRef name="All Events">
| <eventSinkRef name="sqlSink" />
| </eventCategoryRef>
| </filter>
| .........................
| <eventCategories>
| <eventCategory name="All Events" description="This event category
| contains Admin Event Types">
| <event
| type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
| Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0,
Culture=neutral,
| PublicKeyToken=e57d9cc0f060bdb9" />
| </eventCategory>
| <eventCategories>
| .........................
|
| Seems like its not able to find the event type properly even though its
set
| correctly and when I use a debugger, I find the message generated as
below
| which has the Event Type defined correctly
|
| <?xml version="1.0" encoding="utf-8" standalone="yes"?><event:LogEvent
| xmlns:event="urn:2B9EF1B7-CBEC-4da3-9443-BF4C701DAEA7"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent"
| id="553b948c-3596-4d53-9528-caa797e76486"><event:NameValuePair
name="Message"
| value="Admin Message Event to be published" /><event:NameValuePair
| name="ApplicationName" value="-Null-" /><event:NameValuePair
| name="EventSourceInstance" value="cf49fd4d-254c-44ec-85bc-216438df184a"
| /><event:NameValuePair name="EventId"
| value="553b948c-3596-4d53-9528-caa797e76486" /><event:NameValuePair
| name="EventSourceName" value="Application" /><event:NameValuePair
| name="EventSequenceNumber" value="1" /><event:NameValuePair
| name="EventSchemaVersion" value="1.0.0.0" /><event:NameValuePair
| name="TimeStamp" value="12/29/2004 5:51:03 PM" /><event:NameValuePair
| name="AppDomainName" value="BasicSqlSinkSample.exe"
/><event:NameValuePair
| name="MachineName" value="JOSEPH" /><event:NameValuePair
| name="RootRequestName" value="" /><event:NameValuePair
| name="RootRequestInstance" value="" /><event:NameValuePair
| name="RequestInstance" value="" /><event:NameValuePair name="RequestName"
| value="" /><event:NameValuePair name="RequestSequenceNumber" value="0"
| /><event:NameValuePair name="EventLogEntryTypeID" value="4"
| /><event:NameValuePair name="PopulatingEventInfoForFirstTime"
value="False"
| /><event:NameValuePair name="ApplicationLogLevel" value="2"
| /><event:NameValuePair name="EventPublishLogLevel" value="1"
| /><event:NameValuePair name="FormatterName" value="-Null-"
/></event:LogEvent>
|
|
| Any thoughts?
| Thanks
| Raj
|
RE: EIF Config filters not recognizing the Event Types mikehayt_ NO[at]SPAM online.microsoft.com
1/17/2005 7:13:53 PM
By default, EIF:
- reports errors loading the EI.config file to the Windows Event Log
- only reports errors in raising events out to perf counters.

If you change the corresponding <eventSource> internalExceptionHandler
attribute from "ignore" to "report" then it will update the perf counter
and output the error to the Windows Event Log. There is also a "throw"
setting (throws the exception up into the instrumented app) - for this to
work the <instrumentedApp> mode must be set to "debug".

The exceptions thrown should help in the debugging along with the perf
counters. The App Block you'll have the source code for and so if you
ensure the the debugger is loading the corresponding pdb files - it should
be able to trace into the AppBlock source. The EIF source code is not
publicly available. But you'll be able to get method names from exceptions
and you might want to play around with the reverse engineering the code to
better understand it.
see
http://www.blong.com/Conferences/DCon2003/ReverseEngineering/ReverseEngineer
ing.htm - I'd recommend reflector http://www.aisto.com/roeder/dotnet/

Hope this helps

Mike
--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
|
| Mike,
| The GAC was having a older version of App Block dll and once i
| regschema/segsinks the newer version one, it works great. It would have
been
| great if there was any error thrown in the windows event viewer.Thanks a
lot
| for your response.
| Just curious, is there any efficient way to debug the events once
published
| into the EIF framework?Iam trying to debug when the XSLT transformation
| happens and when it tries to insert the data in the database
| Thanks again
| Raj
|
[quoted text, click to view]
|
| > Iam trying to send EventTypes
| > Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent to one
table and
| > send EventTypes
Microsoft.ApplicationBlocks.Logging.Schema.AuditMessageEvent
| > to a different table.
| > When I use a filter as below, it doesnt log anything for
AdminMessageEvent
| > .........................
| > <eventSourceRef name="Application">
| > <filterRef name="defaultApplicationElementFilter" />
| > </eventSourceRef>
| > .........................
| > <filter name="defaultApplicationElementFilter" description="A
default
| > filter for the Application event sources.">
| > <eventCategoryRef name="Admin Events">
| > <eventSinkRef name="sqlSink" />
| > </eventCategoryRef>
| > </filter>
| > .........................
| > <eventCategories>
| > <eventCategory name="Admin Events" description="This event category
| > contains Admin Event Types">
| > <event
| > type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
| > Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0,
Culture=neutral,
| > PublicKeyToken=e57d9cc0f060bdb9" />
| > </eventCategory>
| > <eventCategories>
| > .........................
| >
| > but when I use something as below, it logs in the table
| >
| > .........................
| > <eventSourceRef name="Application">
| > <filterRef name="defaultApplicationElementFilter" />
| > </eventSourceRef>
| > .........................
| > <filter name="defaultApplicationElementFilter" description="A
default
| > filter for the Application event sources.">
| > <eventCategoryRef name="All Events">
| > <eventSinkRef name="sqlSink" />
| > </eventCategoryRef>
| > </filter>
| > .........................
| > <eventCategories>
| > <eventCategory name="All Events" description="This event category
| > contains Admin Event Types">
| > <event
| > type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent,
| > Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0,
Culture=neutral,
| > PublicKeyToken=e57d9cc0f060bdb9" />
| > </eventCategory>
| > <eventCategories>
| > .........................
| >
| > Seems like its not able to find the event type properly even though its
set
| > correctly and when I use a debugger, I find the message generated as
below
| > which has the Event Type defined correctly
| >
| > <?xml version="1.0" encoding="utf-8" standalone="yes"?><event:LogEvent
| > xmlns:event="urn:2B9EF1B7-CBEC-4da3-9443-BF4C701DAEA7"
| > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| > type="Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent"
| > id="553b948c-3596-4d53-9528-caa797e76486"><event:NameValuePair
name="Message"
| > value="Admin Message Event to be published" /><event:NameValuePair
| > name="ApplicationName" value="-Null-" /><event:NameValuePair
| > name="EventSourceInstance" value="cf49fd4d-254c-44ec-85bc-216438df184a"
| > /><event:NameValuePair name="EventId"
| > value="553b948c-3596-4d53-9528-caa797e76486" /><event:NameValuePair
| > name="EventSourceName" value="Application" /><event:NameValuePair
| > name="EventSequenceNumber" value="1" /><event:NameValuePair
| > name="EventSchemaVersion" value="1.0.0.0" /><event:NameValuePair
| > name="TimeStamp" value="12/29/2004 5:51:03 PM" /><event:NameValuePair
| > name="AppDomainName" value="BasicSqlSinkSample.exe"
/><event:NameValuePair
| > name="MachineName" value="JOSEPH" /><event:NameValuePair
| > name="RootRequestName" value="" /><event:NameValuePair
| > name="RootRequestInstance" value="" /><event:NameValuePair
| > name="RequestInstance" value="" /><event:NameValuePair
name="RequestName"
| > value="" /><event:NameValuePair name="RequestSequenceNumber" value="0"
| > /><event:NameValuePair name="EventLogEntryTypeID" value="4"
| > /><event:NameValuePair name="PopulatingEventInfoForFirstTime"
value="False"
| > /><event:NameValuePair name="ApplicationLogLevel" value="2"
| > /><event:NameValuePair name="EventPublishLogLevel" value="1"
| > /><event:NameValuePair name="FormatterName" value="-Null-"
/></event:LogEvent>
| >
| >
| > Any thoughts?
| > Thanks
| > Raj
|
AddThis Social Bookmark Button