[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Error When Writing to Event Viewer in VB

Hi everyone,

I'm writing a basic VB application which, when it catches an error, will write to the event viewer.  I am encountering this message during this process:

 Application Screen Shot
Here is my portions of my code that deal with this process:

        Dim oLog As New EventLog
        oLog.Source = "Tax Import"
        oLog.Log = "Application"

oLog.WriteEntry(Now & " " & row("CallID") & " - Exceeded 7 tax details", EventLogEntryType.Warning)

I am an administrator on this box (Windows Server 2008).  I am using MS Visual Studio 2008.

Thanks in advance for any help,

Deaner
0
dthansen
Asked:
dthansen
1 Solution
 
Paul JacksonCommented:
The error refers to the Source you are setting for the Log and the fact that it is not registered as a valid source.
Have a look here : http://msdn.microsoft.com/en-us/library/xz73e171.aspx
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now