Re: Cannot open log for source {0}. You may not have write access. (Access right wanish after a while)

From: Nicole Calinoiu (calinoiu)
Date: 04/08/05

  • Next message: Kevin Spencer: "Re: How to run aspnet with system account"
    Date: Fri, 8 Apr 2005 08:17:24 -0400
    
    

    "jblo" <jarmo.blomsterN0SPM@ccc.fi> wrote in message
    news:91t5e.142$Bw3.135@read3.inet.fi...
    > Hi,
    >
    > I've tried to solve the problem for almost a week. Once when I reboot
    > server
    > or change SD settings in group policies or in registry it works few hours
    > but next day the same error is back again (i've not yet get an idea how
    > long
    > this grant lasts).

    Are the event log ACLs being changed from their initial states? If so, it
    sounds like you need to identify the process that's responsible for the
    change. If not, could it be that the user context is changing? What does
    WindowsIdentity.GetCurrent return when the exception is thrown? Is this the
    expected user context, and is it the same as when event log entries are
    successfully written?

    >
    > This seems to be very common problem with ASP.NET but I've this nyance of
    > lost access right.
    > Our server is Win 2003 with AD and it's domain controller of it's own
    > domain.
    > Each user is member of Domain Users group, and they log on with basic
    > authentication scheme, so they are authenticated.
    > It seems to be so that after reboot the service works fine for while.
    > Our service is Web Service coded with C#.
    >
    > The error message we get is:
    >
    > Exception: System.InvalidOperationException
    > Message: Cannot open log for source {0}. You may not have write access.
    > Source: System
    > at System.Diagnostics.EventLog.OpenForWrite()
    > at System.Diagnostics.EventLog.WriteEvent(Int32 eventID, Int16 category,
    > EventLogEntryType type, String[] strings, Byte[] rawData)
    > at System.Diagnostics.EventLog.WriteEntry(String message,
    > EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
    > at System.Diagnostics.EventLog.WriteEntry(String message,
    > EventLogEntryType type, Int32 eventID, Int16 category)
    > at System.Diagnostics.EventLog.WriteEntry(String message,
    > EventLogEntryType type, Int32 eventID)
    > at System.Diagnostics.EventLog.WriteEntry(String message,
    > EventLogEntryType type)
    > at MyServer_Facade.MyServer.MyProc(MyPar req)
    >
    > Nested Exception
    >
    > Exception: System.ComponentModel.Win32Exception
    > Message: Access is denied
    >
    >


  • Next message: Kevin Spencer: "Re: How to run aspnet with system account"

    Relevant Pages

    • Re: Converted app to a Windows Service
      ... on the server the app is on. ... the event log. ... Are you using exception handling in your code? ...
      (microsoft.public.dotnet.languages.vb)
    • Re: IIS 6.0 and property pages of websites causing memory errors
      ... ModLoad: 32f50000 3309f000 C:\Program Files\Common Files\Microsoft ... Shared\Web Server Extensions\50\bin\FP5AWEL.DLL ... First chance exceptions are reported before any exception handling. ... > the same error and check event log to see if it has been filled with ...
      (microsoft.public.inetserver.iis)
    • Re: Event Log Trust Level?
      ... What I do in this case is install the event log as part of an installer ... package and then just use write to the event log from the app. ... > but it comes back with this exception: ... > source, String logName, String machineName, Boolean ...
      (microsoft.public.dotnet.security)
    • Re: Write to IIS/Event Log File ?
      ... >with an exception that might arise, ... >either in the web service, ... >Writting to the event log threw me Security Exceptions, ... NET Framework Class Library: ApplicationActivationAttribute ...
      (microsoft.public.dotnet.general)
    • Re: Help! Error: aspnet_wp.exe (PID: xxxx) stopped unexpectedly
      ... there was no entry in event log related to recycling. ... The error was due an exception generated by the HashTable.Addmethod(in my ... The worker process was indeed bringing up the debugger selection panel(with ... Have you found any recycle record in eventlog?... ...
      (microsoft.public.dotnet.framework.aspnet)