I cannot get my application to log to the application event viewer in
server '08. it's strange as it works fine on one of my machines, but
not on two others (and all similarly configured, i'm running with
default security enabled on all 3 boxes, ...).
has anyone seen this before?
here's a sample except:
class Program
{
static string _eventSource = "evntSrc1";
static string _logAppName = "ServiceApplica tion1";
static int eventId = 33;
static void Main(string[] args)
{
if (!EventLog.Sour ceExists(_event Source))
{
EventLog.Create EventSource(_ev entSource, _logAppName);
}
EventLog myLog = new EventLog();
myLog.Source = _eventSource;
myLog.WriteEntr y("test msg1", EventLogEntryTy pe.Error,
eventId);
}
}
thanks, dave
server '08. it's strange as it works fine on one of my machines, but
not on two others (and all similarly configured, i'm running with
default security enabled on all 3 boxes, ...).
has anyone seen this before?
here's a sample except:
class Program
{
static string _eventSource = "evntSrc1";
static string _logAppName = "ServiceApplica tion1";
static int eventId = 33;
static void Main(string[] args)
{
if (!EventLog.Sour ceExists(_event Source))
{
EventLog.Create EventSource(_ev entSource, _logAppName);
}
EventLog myLog = new EventLog();
myLog.Source = _eventSource;
myLog.WriteEntr y("test msg1", EventLogEntryTy pe.Error,
eventId);
}
}
thanks, dave