Questions tagged [eventlog-source]

Questions about the Source attribute of Microsoft Windows Event Log Entries

66 questions
64
votes
3 answers

How do you create an event log source using WiX

I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation. Does anyone know the best way to do this using the WiX framework.
Edward Wilde
  • 25,967
  • 8
  • 55
  • 64
42
votes
10 answers

How to determine if an EventLog already exists

I'm using the following line to create a new event log new-eventlog -LogName "Visual Studio Builds" -Source "Visual Studio" I want to run this every time, because if I run a build from a new computer, I'd still like to see the event logs. The…
Chase Florell
  • 46,378
  • 57
  • 186
  • 376
25
votes
12 answers

What is the most reliable way to create a custom event log and event source during the installation of a .Net Service

I am having difficulty reliably creating / removing event sources during the installation of my .Net Windows Service. Here is the code from my ProjectInstaller class: // Create Process Installer ServiceProcessInstaller spi = new…
Jason Stevenson
  • 4,004
  • 3
  • 29
  • 49
15
votes
1 answer

How to create a .NET event log source using WiX

This is an intentional semi-duplicate of How do you create an event log source using WiX and WIX: Create EventSource using .NET message file. My first question is, does it really have to be so complicated? Isn't there some way to simply specify to…
RenniePet
  • 11,420
  • 7
  • 80
  • 106
11
votes
1 answer

In Windows, what default event sources are available in the Application Event Log?

Short Version: Are the event sources "Application" and "Application Error" always included in the Application Event Log? Are they available on new installations of Windows XP, Vista and Windows 7? Would it be really bad to use them instead of…
freshr
  • 955
  • 1
  • 9
  • 27
9
votes
2 answers

Windows Event IDs

Is there a specific range of Event IDs in Windows reserved for application developers? I'm working on a .Net application that will write errors to the windows event log. This application actually targets servers, and will be run as a scheduled task…
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
7
votes
3 answers

Setup project for a windows service and the event log

I got a setup project that installs a windows service. We are registering a event log source in a custom log which should be used by the winservice project (how and why is not important). My problem is that the setup project tries to create an event…
jgauffin
  • 99,844
  • 45
  • 235
  • 372
7
votes
5 answers

An event log source that's always available for writing?

Is there an event log source that's always available for writing by an ASP.NET webapp? Backstory, in case anyone has a seemingly unrelated solution: Our ASP.NET webapp uses its own event log source, but it doesn't have the rights to create it. So,…
lance
  • 16,092
  • 19
  • 77
  • 136
7
votes
3 answers

Using EventLog in ClickOnce application

I've got a library that I use across multiple ClickOnce applications. In the event of an error in this library I would like to write the error to the windows EventLog. I found a KB article on how but it seems that this requires administrator…
Fr33dan
  • 4,227
  • 3
  • 35
  • 62
5
votes
1 answer

WIX: Create EventSource using .NET message file

I'm creating an installer for my application using WIX. Everything works fine so far. However, I'm trying to create a new event source during installation and that doesn't work as expected. I've read and understood this question here on SO, but I…
Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139
4
votes
2 answers

How to read the Windows Event Log without an EventMessageFile?

I have code that reads the Windows Event Log. It uses OpenEventLog, ReadEventLog and gets the event source and event ID. Then it looks up the source under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application key, loads…
DougN
  • 4,407
  • 11
  • 56
  • 81
4
votes
2 answers

WiX to install EventSource

I created my event source based on this example. My event source looks like this: [EventSource(Name = "Samples-EventSourceDemos-EventLog")] public sealed class MinimalEventSource : EventSource { public static MinimalEventSource Log = new…
Icerman
  • 1,099
  • 4
  • 14
  • 30
4
votes
1 answer

How to obtain event logs for particular application from Windows Event Viewer

I'm implementing an application that works similar to Windows Event Viewer. I mean that it monitors System Event Logs and Application Event logs with the help of EventLog and EventLogEntry classes. Is it possible to obtain Application Event logs for…
Alex B.
  • 77
  • 3
  • 7
3
votes
3 answers

How to check whether this event log exist?

In one of my project, I need to check whether the event log "Microsoft-Exchange-ManagedAvailability/Monitoring" exists on the machine (event source is ManagedAvailability). I used…
urlreader
  • 6,319
  • 7
  • 57
  • 91
3
votes
1 answer

Creating previously deleted source in different event log doesnt work

I have been fighting with the Windows Event log for lots of hours with inconsistent behaviour during test of the log4net EventLogAppender and I realized, that the log4net code worked, but my windows event log was the one being…
Stephan Møller
  • 1,247
  • 19
  • 39
1
2 3 4 5