Error When Writing to Event Viewer in VB

Posted on 2011-05-02
Last Modified: 2012-06-21
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,

Question by:dthansen
    1 Comment
    LVL 29

    Accepted Solution

    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 :

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
    This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now