-
July 3rd, 2004, 08:26 AM
#1
Starting Windows Service fails: 'access denied'
Hi, Gurus!
I have created a windows service in C#.
My problem:
I can install it with installutil.exe but when I try to start it, I get an 'Error 5: Access denied' messagebox!
Here some System-Info:
+ My OS is Windows 2000.
+ Net-Framework-Version is v1.1.4322.
+ I'm logged on as an administrator and have full access to the windows-installer-folder, so this cannot be the reason for the error.
TIA for Your help!
Mikey
-
July 3rd, 2004, 10:12 AM
#2
hmmz... can you please post a code that you use to start that service? that might help...
Regards,
Alexei
-
July 3rd, 2004, 10:28 AM
#3
Hi Alexei,
Thanks for Your reply!
This error occurs even with the simplest form of a Windows Service which was generated by the "New Project"-Visual.Net-Wizard.
All I did "on my own" was adding an Installer-Class by clicking the "Add Installer"-link!
Thanks for further Help!
Mikey
-
July 3rd, 2004, 10:30 AM
#4
hmmz... wait a second... so you are trying to intall by clicking from the link on your form?!
Regards,
Alexei
-
July 3rd, 2004, 10:47 AM
#5
no, no,
I have installed the service (with "LocalSystem-Account") with the installutil-tool. That works fine.
But when I try to start it, e.q. via "net start service1" I get that error "access denied"!
???
Mikey
still
-
July 3rd, 2004, 10:50 AM
#6
hmmz... if youve installed the services... how about checking what type of settings it has (Auto/Manual/Disabled)..
Maybe its simply disabled and you cant start it... that way you will always get that error...
why not use Process.Start("service1.exe")??
Wouldnt it be better?
Regards,
Alexei
-
July 3rd, 2004, 11:08 AM
#7
Thanks, Alexei,
but the service isn't disabled. The StartUp-type is set to 'Manual'.
In the Services Property-Dialog I can even change the StartUp-type for my service!
But I just cannot start it.
???
Mikey
-
July 3rd, 2004, 11:10 AM
#8
hmmz... you say Mikey ... now its Alexei
I have NO idea what so ever about the reason of this problem...
Can you try setting in to Automatic and rebooting your PC? to see that the service really starts...
Regards,
Alexei
-
July 3rd, 2004, 01:57 PM
#9
You're right.
When I reopen the Service Property-Dialog the StartUp-type is set back to 'Manual'. So I can't change it also.
???
-
July 3rd, 2004, 02:09 PM
#10
hmmz... weird weird... okej... lets see...
any code youve writen for that service or is it just a wizard-created service without any additions?
Regards,
Alexei
-
July 3rd, 2004, 02:11 PM
#11
it is just wizard created! no additions!
-
July 3rd, 2004, 03:33 PM
#12
WAIT!!!!!!!!
I might just have the solution...
It said -- access denied, right? so why not try to clode EVERYTHING that might be using that service
Including VS.net and even rebooting your PC... just try... it might work
Regards,
Alexei
-
July 3rd, 2004, 03:36 PM
#13
Good idea!
I'll try it...
-
July 3rd, 2004, 03:36 PM
#14
Good luck
Regards,
Alexei
-
July 3rd, 2004, 03:53 PM
#15
Hi, Alexei!
Noop... - Didn't work
I also copied it to my second computer. Same behavior...
I feel, I have to talk to my psychotherapist...
Alexei, have You checked Your e-mail?
I've sent You the code. Can You reproduce the error on Your machine?
???
still
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|