473,748 Members | 10,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Service startup error


I have created a windows service based on a walkthrough in the MSDN
library
(ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_radcon/html/e24d8a3d-edc6-485c-b6e0-5672d91fb607.ht m
- Creating a Windows Service Application in the Component Designer)

But when I start the service I get a Unhandled
System.Security .SecurityExcept ion and then the Error: 1053 popup.

If I'm quick with the debugger I get an exception on:

if (!System.Diagno stics.EventLog. SourceExists("M ySource")){

of:

System.Security .SecurityExcept ion was unhandled
Message="The source was not found, but some or all event logs could
not be searched. Inaccessible logs: Security."
Source="System"
StackTrace:
at System.Diagnost ics.EventLog.Fi ndSourceRegistr ation(String
source, String machineName, Boolean readOnly)
at System.Diagnost ics.EventLog.So urceExists(Stri ng source,
String machineName)
at System.Diagnost ics.EventLog.So urceExists(Stri ng source)
at MyNewService.My NewService..cto r()
at MyNewService.My NewService.Main ()

Any ideas what is causing this? and/or how to fix it.

Cheers,
Nick
Feb 9 '06 #1
0 1252

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2890
by: Stefan Hinz | last post by:
Degan, jumping in to try and solve some problems that look pretty obvious to me ... > #options for default service (mysqld2) > (mysqld2) It should be , not (mysqld2).
4
15893
by: Keith | last post by:
I'm in the same boat as the fellow who posted this message back in August: Title : Windows Service, How does one make a service "fail" properly? Author : Ross Bennett Group : microsoft.public.dotnet.languages.csharp URL :...
3
14945
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim swLog As StreamWriter = File.CreateText("C:\myLog.txt") swLog.WriteLine("My Windows Service has just started.") swLog.Close() : swLog.Flush() End Sub
4
2106
by: duzinga | last post by:
I am trying to have a server program that runs at startup and accepts several commands from the clients. One of the commands is to play an audio file. I am using Microsoft.DirectX.AudioVideoPlayback.Audio class for that purpose. My problem is whenever I send a command to the program windows gives an error related to the directX, and shuts down the program. However if I run the program manually after the startup it works just fine. I have...
1
3697
by: Sergey Krutous | last post by:
Can you please help me to resolve the following issue: I developed a windows service. At start up (I have overriden OnStart method) it connects to a web service and if the connection fails the windows service sets ExitCode property to non-zero value (55) and calls Stop method. If this happens when user starts the service in Services snap-in SCM shows error massage and service stops - it's OK. I configured automatic startup and Recovery...
4
4180
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
4
1987
by: Ashley Bryant | last post by:
I've created a Windows Service in vb.net that is set up to run automatically, but it never starts during system startup. I can start it manually, but I need the service to start without any user interaction. When I originally installed the service, I had to attempt the start twice as well from the Service Manager. So, for some odd reason, it has to be told twice to start. I get the following errors in the System log at startup: ...
1
6415
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... After I installed my .net windows service, I tried to control some of the behavior with the Start Parameters: in the services control parameter. I can put a value in the box but for some reason it never gets saved (I open the properties right after, and the box is empty). How does one persist a value in the Start Parameters box for a service? Thanks
7
13392
by: =?Utf-8?B?Sm9obi5ORVQ=?= | last post by:
Hi I have written a windows service in C# / .NET I have installed it and it's working fine on a couple boxes but on my XP box I get this error when I try to start it: Error 1053: The service did not respond to the start or control request in a timely fashion. I understand that the scm issue the start and is supposed to put up this error after some timeout period but it's coming up after only about half a second and it doesnt even...
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.