RE: EIF Event Log Problems
From: Mike Hayton [MS] (mikehayt__at_online.microsoft.com)
Date: 08/19/04
- Next message: Mike Hayton [MS]: "RE: COM support for EIF"
- Previous message: Ozcan Degirmenci: ".wid File Edit"
- In reply to: paul: "EIF Event Log Problems"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 17:59:50 GMT
You'll need to installutil your instrumented assemblies.
Normally you add a ProjectInstaller to your instrumented application and
then run install util on it - this creates the EventSource in the Windows
Event Log. (If this doesnt happen, the logEventSink will try and do it when
its created - in this case there is insufficient permissions and it fails).
Here you could add the ProjectInstaller to the instrumented assembly and
run installutil on it.
I'll add some description of the installers in EIF below
Hope this helps
Mike
================================================
Here's a bigger explaination of all the EIF installers from the thread
in this newsgroup "EIF - InstallUtil what exactly does it do?"
-----------
There's actually three installutils in EIF:
1) installutil-ing the instrumented app
2) installutil-ing the schema dll.
3) some installutil-ing goes on when you first install EIF.
1) installutil-ing the instrumented app
---------------------------------------------------
Yes, you can hand craft the EI.config file and not perform the installutil
on the instrumented application. The only action missing would be the
registration of the EventSources in the Windows Event Log (specifically no
calls to System.Diagnostics.EventLog.CreateEventSource() are made).
It should be noted that the LogEventSink will automatically call
EventLog.CreateEventSource() if needed when the instrumented application is
executed. The only problem is that sometimes apps (e.g. ASP.NET Web Apps)
dont have sufficient permissions to make this call. In this case, the
logEventSink fails to load for this EventSource, an error is output the
Windows Event Log (notifiying of the error) and events that would have been
output to the logEventSink are dropped.
2) installutil-ing the schema dll.
---------------------------------------------------
This second one performs the following actions:
a) checks that all the event Types are of valid structure (e.g. EIF doesnt
allow self reference cycles - such as a typical node in a linked list
structure)
b) delegates through to WMI.NET's
System.Management.Instrumentation.ManagementInstaller - This Installer
registers the structure of the events in WMI's CIM Repoisitory and allows
the events to be output through WMI.NET
3) some installutil-ing goes on when you install EIF.
---------------------------------------------------
I wont go into much detail here, but a quick summary:
a) The perf counter categories and counter names are setup.
b) The Windows Trace Session Manager (TSM) service is installed.
c) The TraceRequestStart/EndEvent (or something like that name) are
registered with WMI's repository.
Cheers
Mike
--------------------
| Hi
|
| I'm having real problems installing my logging components for use by a
| web service. I have installed them fine in other environments, but am
| having problems with 2 particular, load balanced servers.
|
| I have installed the EIF, used installutil to register my Logging
| assemblies and even put them in the GAC. I made sure I was in the
| Administrators group prior to doing this but I get the following error
| in the event log whenever anything is logged:
|
| Event Type: Error
| Event Source: Enterprise Instrumentation
| Event Category: None
| Event ID: 0
| Date: 19/08/2004
| Time: 08:35:03
| User: N/A
| Computer: STAOPASINT01
| Description:
| Error loading an Event Sink of type
| 'Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink,
| Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.1,
| Culture=neutral, PublicKeyToken=bde98c9c96b31b0d'. The Event Source of
| name 'Application' will not write events out to this Event Sink. The
| following exception was returned during the load:
|
| System.Reflection.TargetInvocationException: Exception has been thrown
| by the target of an invocation. --->
| System.Security.SecurityException: Requested registry access is not
| allowed.
| at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean
| writable)
| at System.Diagnostics.EventLog.CreateEventSource(String source,
| String logName, String machineName, Boolean useMutex)
| at System.Diagnostics.EventLog.CreateEventSource(String source,
| String logName, String machineName)
| at System.Diagnostics.EventLog.CreateEventSource(String source,
| String logName)
| at
Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink.CreateEventSourc
e()
| at
Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink..ctor(IDictionar
y
| parameters, EventSource eventSource)
| --- End of inner exception stack trace ---
| at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags
| invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
| Boolean isBinderDefault)
| at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags
| invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
| at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
| Binder binder, Object[] args, CultureInfo culture, Object[]
| activationAttributes)
| at System.Activator.CreateInstance(Type type, BindingFlags
| bindingAttr, Binder binder, Object[] args, CultureInfo culture,
| Object[] activationAttributes)
| at System.Reflection.Assembly.CreateInstance(String typeName,
| Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[]
| args, CultureInfo culture, Object[] activationAttributes)
| at
Microsoft.EnterpriseInstrumentation.EventSinks.EventSink.CreateNewEventSinks
(DataRow[]
| eventSinkRows, EventSource eventSource)
|
|
| I have even tried making the ASPNET account a member of the
| Administrators group but it makes no difference. Please an anyone
| help?
|
| Thanks. Paul.
|
-- 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
- Next message: Mike Hayton [MS]: "RE: COM support for EIF"
- Previous message: Ozcan Degirmenci: ".wid File Edit"
- In reply to: paul: "EIF Event Log Problems"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|