Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 25th, 2005, 11:17 AM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Windows Service will not create event messages

I have created a windows service and have it installed. When I try to start the service, I get a message box named JIT Debugging with a message stating that access is denied. Then another message box stating the service could not be started.

My service is create with this code to create the event log.
    Public Sub New()
        MyBase.New()

        ' This call is required by the Component Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call
        If Not EventLog.SourceExists("AdminReportSource") Then
            EventLog.CreateEventSource("AdminReportSource", "AdminReportLog")
        End If
        eLog.Source = "AdminReportSource"
        eLog.Log = "ReportLog"
    End Sub

Then in the OnStart sub, I try to write out a message.
    Protected Overrides Sub OnStart(ByVal args() As String)
        eLog.WriteEntry("AdminReportService Started.")
    End Sub

If I comment out WriteEntry, the services starts. Why am I unable to create event messages?


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Impersonate with windows service for Service A/C vinod_yadav1919 C# 0 October 18th, 2008 02:29 PM
Create memory structure for receiving messages remya1000 .NET Framework 1.x 3 March 6th, 2008 04:30 PM
Accessing Windows service from a windows app sajid08 C# 1 October 6th, 2006 10:25 AM
Service to detect a WM_ message event sencee C# 1 April 24th, 2006 02:25 AM
How to create TCPListener windows service usingC# baqer C# 0 September 24th, 2003 08:43 AM



All times are GMT -4. The time now is 06:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.