Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Enterprise Tools / September 2004

Tip: Looking for answers? Try searching our database.

EIF Event Log Problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paul - 19 Aug 2004 09:02 GMT
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.CreateEventSource()
  at Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink..ctor(IDictionary
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.
paul - 20 Aug 2004 13:57 GMT
Thanks Mike

We're using Microsoft.ApplicationBlocks.Logging.Schema.dll and I've
tried installing it using installutil.exe and "regschema.cmd /i /g
Microsoft.ApplicationBlocks.Logging.Schema.dll" (from the C:\Program
Files\Microsoft Application Blocks for .NET\Logging\Logging\Utilities
folder). From the log files, both look like they work fine but it's
still trying to create the EventSource whenever I try and log
anything.

Like I said, I have successfully installed the exact same assembly in
2 other environments so I'm a bit stuck. The install log is below:

Uninstalling assembly
'e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll'.
Affected parameters are:
  assemblypath = e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll
  logfile = e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.InstallLog
Installing assembly 'e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll'.
Affected parameters are:
  assemblypath = e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll
  logfile = e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.InstallLog
Checking schema for compliance with field/property constraint rules...
Finished checking schema. 29 types checked, 0 failed.
Installing WMI Schema: Started
Registering assembly:
Microsoft.ApplicationBlocks.Logging.Schema_SN_bde98c9c96b31b0d_Version_1.0
Ensuring that namespace exists: root\MicrosoftWmiNet
Ensuring that class exists:
root\MicrosoftWmiNet:WMINET_Instrumentation
Ensuring that class exists:
root\MicrosoftWmiNet:WMINET_InstrumentedNamespaces
Ensuring that class exists: root\MicrosoftWmiNet:WMINET_Naming
Ensuring that namespace exists: root\Logging\EnterpriseInstrumentation
Ensuring that class exists:
root\Logging\EnterpriseInstrumentation:WMINET_Instrumentation
Ensuring that class exists:
root\Logging\EnterpriseInstrumentation:WMINET_InstrumentedAssembly
Ensuring that class exists:
root\Logging\EnterpriseInstrumentation:MSFT_DecoupledProvider
Ensuring that class exists:
root\Logging\EnterpriseInstrumentation:WMINET_ManagedAssemblyProvider
Installing WMI Schema: Finished
Committing assembly 'e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll'.
Affected parameters are:
  assemblypath = e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll
  logfile = e:\swan.net\webcontent\development\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.InstallLog
Installing assembly 'e:\swan.net\webcontent\stresstest\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll'.
Affected parameters are:
  assemblypath = e:\swan.net\webcontent\stresstest\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll
  logfile = e:\swan.net\webcontent\stresstest\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.InstallLog
Checking schema for compliance with field/property constraint rules...
Finished checking schema. 29 types checked, 0 failed.
Installing WMI Schema: Started
Installing WMI Schema: Finished
Committing assembly 'e:\swan.net\webcontent\stresstest\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll'.
Affected parameters are:
  assemblypath = e:\swan.net\webcontent\stresstest\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.dll
  logfile = e:\swan.net\webcontent\stresstest\bupa.swan.webservices\bin\microsoft.applicationblocks.logging.schema.InstallLog
Mike Hayton [MS] - 04 Sep 2004 02:28 GMT
Is this still a problem for you?
paul - 07 Sep 2004 08:44 GMT
Hi Mike

We managed to fix it in the end - it turns out that it had been a
problem in the other environments as well but a colleage (who was on
holiday when I logged the original message) had been manually fixing
it :-|

Anyway, we added a seperate installer to register the event source as
follows:

Imports System
Imports System.Configuration.Install
Imports System.Diagnostics
Imports System.ComponentModel

<RunInstaller(True)> _
Public Class MyEventLogInstaller
   Inherits Installer
   Private myEventLogInstaller As EventLogInstaller

   Public Sub New()
       myEventLogInstaller = New EventLogInstaller
       myEventLogInstaller.Source = "Application (Swan)"
       myEventLogInstaller.Log = "Application"
       Installers.Add(myEventLogInstaller)
   End Sub
   Public Shared Sub Main()
   End Sub
End Class

It's also worth noting you can get the web server to register it
automatically by temporarily raising the security account for the
application pool (W2k3) as follows:

In computer management, select IIS Manager/Application Pools. Select
the application pool for the web service web site, click
properties/identity tab and change the security account to "Local
System". Now request a page/web service which uses the even source and
the server should register it automatically. When it's working, set
the application pool security account back to what it was.

Cheers. Paul.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.