[WebMethod]
public void AAA_WriteToEventLog(string message)
{
string source = "CroInternalWebServices";
string logType = "Application";
string machineName = ".";
if (!System.Diagnostics.EventLog.SourceExists(source, machineName))
{
System.Diagnostics.EventLog.CreateEventSource(new EventSourceCreationData(source, logType));
}
System.Diagnostics.EventLog eLog = new EventLog(logType, machineName, source);
eLog.WriteEntry(message, EventLogEntryType.Information);
}
|