471,336 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

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.htm
- Creating a Windows Service Application in the Component Designer)

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

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

if (!System.Diagnostics.EventLog.SourceExists("MySour ce")){

of:

System.Security.SecurityException 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.Diagnostics.EventLog.FindSourceRegistration (String
source, String machineName, Boolean readOnly)
at System.Diagnostics.EventLog.SourceExists(String source,
String machineName)
at System.Diagnostics.EventLog.SourceExists(String source)
at MyNewService.MyNewService..ctor()
at MyNewService.MyNewService.Main()

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

Cheers,
Nick
Feb 9 '06 #1
0 1162

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sergey Krutous | last post: by
4 posts views Thread by tshad | last post: by
4 posts views Thread by Ashley Bryant | last post: by
1 post views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
7 posts views Thread by =?Utf-8?B?Sm9obi5ORVQ=?= | last post: by
reply views Thread by rosydwin | last post: by

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.