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 = "ServiceApplication1";
static int eventId = 33;
static void Main(string[] args)
{
if (!EventLog.SourceExists(_eventSource))
{
EventLog.CreateEventSource(_eventSource, _logAppName);
}
EventLog myLog = new EventLog();
myLog.Source = _eventSource;
myLog.WriteEntry("test msg1", EventLogEntryType.Error,
eventId);
}
}
thanks, dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment
You may subscribe to group Feeds using a RSS Feed Reader to stay upto date
using following url
<a href="http://feeds.feedburner.com/DotNetDevelopment">
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---