Groups | Blog | Home
all groups > visual studio .net enterprise tools > april 2005 >

visual studio .net enterprise tools : EIF can write Audit but not Error


Eric
4/23/2005 3:15:20 PM
I am seeing some strange behavior when calling eventSource.Error from
within my ASP.Net application. Nothing is written to the Event Log.
Normally this might seem like a config issue, but calling .Audit (or
..AuditOperation) causes the message to be written out to the Event Log.

CODE:

string msg = "My Message";

// Extremely strange behavior: Calling .Audit or .AuditOperation
// causes an appropriate entry to be logged in the EventLog,
// but calling .Error does not !?

eventSource.Error(msg);
eventSource.AuditOperation(msg, false, "Error logged as Audit
Failure");

My eventSource uses the defaultSoftwareElementFilter, which is setup to
log all events.

Ideas?

Thanks,

Eric
mikehayt_ NO[at]SPAM online.microsoft.com
7/13/2005 5:14:55 PM

Does this problem reproduce if you take one of the sample EIF console
programs and replace its code with yours (and its EI.config with your one)?
If so, then its likely to be a problem in your EI.config file.

If not, then the probable cause is that the Windows Event Log doesnt have
all its EventSources correctly registered.
ASPNETUser - the user that ASP.NET runs under has less permissions that a
normal user. This was done in the interests of security.
As a result, EIF's LogEventSink can not automatically create on the fly an
Windows Event Log event source, if it doesnt already exist.
You can compile a ProjectInstaller into your code and then run sa an admin
installutil on your dll / exe to install these event log entries.

I know its been a while since you posted this - sorry about the delay in
replying to this.

Let me know if you still have a problem and want further help

Mike


--

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
--------------------
|
| I am seeing some strange behavior when calling eventSource.Error from
| within my ASP.Net application. Nothing is written to the Event Log.
| Normally this might seem like a config issue, but calling .Audit (or
| .AuditOperation) causes the message to be written out to the Event Log.
|
| CODE:
|
| string msg = "My Message";
|
| // Extremely strange behavior: Calling .Audit or .AuditOperation
| // causes an appropriate entry to be logged in the EventLog,
| // but calling .Error does not !?
|
| eventSource.Error(msg);
| eventSource.AuditOperation(msg, false, "Error logged as Audit
| Failure");
|
| My eventSource uses the defaultSoftwareElementFilter, which is setup to
| log all events.
|
| Ideas?
|
| Thanks,
|
| Eric
|
|
AddThis Social Bookmark Button