EIF and Web Serivces

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Graham Allwood (graham.allwood_at_nospamtoEborsolutions.com)
Date: 05/07/04


Date: Fri, 7 May 2004 01:06:23 +0100

I think this must be a faq, but can I find the answer - no.

I successfully used the logging app block in my windows app (sample test),
but I'm now putting it in to my web services. When I try am raise an event
from the web services I'm getting an Error in the event log from EIF, saying
that the LogEventSink cannot be used because a Security Exception was thown,
as below:

Event Type: Error
Event Source: Enterprise Instrumentation
Event Category: None
Event ID: 0
Date: 07/05/2004
Time: 00:55:11
User: N/A
Computer: GRAVYXP
Description:
Error loading an Event Sink of type
'Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink,
Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=490cbe481ee0124d'. 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.FindSourceRegistration(String source,
String machineName, Boolean readOnly)
   at System.Diagnostics.EventLog.SourceExists(String source, String
machineName)
   at System.Diagnostics.EventLog.SourceExists(String source)
   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)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Thanks for any help.

Graham



Relevant Pages

  • Re: SecurityException: Request Failed on CreateInstanceAndUnwrap
    ... at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder ... binder, Objectargs, CultureInfo culture, ObjectactivationAttributes) ... Binder binder, Objectargs, CultureInfo culture, Object ... at System.Activator.CreateInstance(String assemblyName, String typeName, ...
    (microsoft.public.dotnet.security)
  • Re: ADO in D2005
    ... Next, look for TADOConnection. ... at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder ... binder, Objectargs, CultureInfo culture, ObjectactivationAttributes) ... Binder binder, Objectargs, CultureInfo culture, Object ...
    (borland.public.delphi.database.ado)
  • TypeDelegator ArgumentException
    ... at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder ... binder, Objectargs, CultureInfo culture, ObjectactivationAttributes) ... Binder binder, Objectargs, CultureInfo culture, Object ...
    (microsoft.public.dotnet.framework.remoting)
  • MSExchangeOMA 1507 on SBS2003
    ... On an single SBS2003 system, i.e. domain controller, exchange server etc.. ... invokeAttr, Binder binder, Objectparameters, CultureInfo culture, Boolean ... at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder ...
    (microsoft.public.exchange.admin)
  • OMA on Exchange 2003 - Event ID 1507
    ... I am experiencing a problem logging onto OMA after installing Windows 2003 ... All local machines and the server point to the server for DNS. ... invokeAttr, Binder binder, Objectparameters, CultureInfo culture, Boolean ...
    (microsoft.public.exchange.connectivity)