Note that there are some explanatory texts on larger screens.

plurals
  1. POError : System.IO.IOException: the network path was not found
    text
    copied!<p>when i am executing following code it results an error please help me to resolve this.</p> <pre><code> class MySample { public static void Main() { string eventLogName = "Security"; string sourceName = "BTHUSB"; string machineName = "v.i.com"; EventLog eventLog; eventLog = new EventLog(); eventLog.Log = eventLogName; eventLog.Source = sourceName; eventLog.MachineName = machineName; foreach (EventLogEntry log in eventLog.Entries.Cast&lt;EventLogEntry&gt;().Reverse())// Entries.Cast&lt;EventLogEntry&gt;().Reverse { Console.WriteLine(") Entry type: {0} , Category: {1}, Data: {2}, ID: {3}, Source: {4} \n", log.EntryType, log.TimeWritten, log.EventID, log.InstanceId, log.Source); } } } </code></pre> <p>Error is ,</p> <blockquote> <pre><code> Unhandled Exception: System.IO.IOException: The network path was not found. at Microsoft.Win32.RegistryKey.Win32ErrorStatic(Int32 errorCode, String str) at Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(RegistryHive hKey, String ma chineName) at System.Diagnostics.EventLog.GetEventLogRegKey(String machine, Boolean writ able) at System.Diagnostics.EventLog.Exists(String logName, String machineName) at System.Diagnostics.EventLog.OpenForRead(String currentMachineName) at System.Diagnostics.EventLog.GetEntryAtNoThrow(Int32 index) at System.Diagnostics.EventLogEntryCollection.EntriesEnumerator.MoveNext() at System.Linq.Enumerable.&lt;CastIterator&gt;d__aa`1.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.&lt;ReverseIterator&gt;d__99`1.MoveNext() at event.MySample.Main() in E:\.net prep\.net examples\event\event\Program.cs :line 42 </code></pre> </blockquote> <p>please help me to resolve this, in a machine name field how to enter the remote machine, when it have v.i.com , but that system name is v only.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload