Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"How to write to the Event Viewer"
No comments yet. -
1 – 0 of 0
from
http://support.microsoft.com/kb/307024
using System.Diagnostics;
...
WriteToEventViewer("MOSS-CRM Webservice", "Application", "User provided is invalid");
...
private void WriteToEventViewer(string sSource, string sLog, string sEvent)
{
if (!EventLog.SourceExists(sSource))
EventLog.CreateEventSource(sSource, sLog);
EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234);
}
Also:
System.Diagnostics.EventLog eventLog = new System.Diagnostics.EventLog("Application"); eventLog.Source = "Rtws"; eventLog.WriteEntry(ex.ToString(), System.Diagnostics.EventLogEntryType.Error);
[Image]
end
posted by fc at
5:42 PM
on Nov 28, 2007
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"How to write to the Event Viewer"
No comments yet. -