Event Log : Network Path Not Found

I searched a lot on this, and finally figured out it was my coding mistake.

I created an EventLog as EventLog(logName, sourceName);

When I checked the constructor, it was EventLog(logName, machineName)..

Now it all makes sense.. 🙂

UPDATE: I actually had to make use of the EventLog(logName, machineName) constructor to support viewing a remote event log, and had an issue with Network Path Not Found when I tried to use

new EventLog(“logName”, “localhost”);

The fix is

  1. Use new EventLog(“logName”, “.”) for localhost
  2. For actual remote machines, make sure the “Remote Registry” service is running on the machine.  (When this service is running, new EventLog(“logName”, “localhost”) also works
Advertisements

About vijayvepa

I'm a software consultant for Software Specialists Inc. currently working at Philips Respironics, Pittsburgh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: