D
David Conorozzo
I am able to create new sources using CreateEventSource.
I can call GetEventLogs, I can delete sources, I can see
if sources exist BUT, as soon as I try a "WriteEntry", I
get an exception:
{System.InvalidOperationException}
[System.InvalidOperationException]:
{System.InvalidOperationException}
HelpLink: Nothing
InnerException: {System.ComponentModel.Win32Exception}
Message: "Cannot open log for source {0}. You may not
have write access."
Source: "System"
StackTrace: " 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 FormRouter.Global.LogError(String sError) in
c:\inetpub\wwwroot\FormRouter\Global.asax.vb:line 79"
TargetSite: {System.Reflection.RuntimeMethodInfo}
The inner exception is:
{System.ComponentModel.Win32Exception}
[System.ComponentModel.Win32Exception]:
{System.ComponentModel.Win32Exception}
HelpLink: Nothing
InnerException: Nothing
Message: "Access is denied"
Source: Nothing
StackTrace: Nothing
TargetSite: Nothing
I don't quite understand. I am running .NET v.1.1.4322.
I am developing using VS .NET 2003. I am running Windows
2003 Server Enterprise.
I can call GetEventLogs, I can delete sources, I can see
if sources exist BUT, as soon as I try a "WriteEntry", I
get an exception:
{System.InvalidOperationException}
[System.InvalidOperationException]:
{System.InvalidOperationException}
HelpLink: Nothing
InnerException: {System.ComponentModel.Win32Exception}
Message: "Cannot open log for source {0}. You may not
have write access."
Source: "System"
StackTrace: " 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 FormRouter.Global.LogError(String sError) in
c:\inetpub\wwwroot\FormRouter\Global.asax.vb:line 79"
TargetSite: {System.Reflection.RuntimeMethodInfo}
The inner exception is:
{System.ComponentModel.Win32Exception}
[System.ComponentModel.Win32Exception]:
{System.ComponentModel.Win32Exception}
HelpLink: Nothing
InnerException: Nothing
Message: "Access is denied"
Source: Nothing
StackTrace: Nothing
TargetSite: Nothing
I don't quite understand. I am running .NET v.1.1.4322.
I am developing using VS .NET 2003. I am running Windows
2003 Server Enterprise.