control windows service

  • Thread starter Thread starter Ha ha
  • Start date Start date
H

Ha ha

how can i control a windows service through a web page,
for example:
start a service
stop a service

thanks
 
when I accesss the web page and start my windows service by clicking a
button,system hint me
System.ComponentModel.Win32Exception:refuse access

what is the reason and what can I do .

thanks
 
The user that the web site is running under (ASP_NET) does not have right
access to start/stop services on this machine.

The issue here is security. You don't want anyone to be able to stop and
start services on a server remotely... If you're confident that only secure
users will access this web site/page, then you can increase accesss rights
(EG. include this user in the power users group).

HTH.

Dan.
 
I access the web page on the server and the user is administrator ,the
result is the same .I was refused.
 
Hi,

It's still running as the anonymous user, you have to do several things:
1- Put this in the web.config file:
<authentication mode="Windows"/>
<identity impersonate="true"/>

2- Go to the IIS right click on the app name and select properties/
Directory properties and uncheck "anonymous access"

Cheers,
 
sorry for my bothering you again,Do you have any idea to assign a
definite right of controlling a special windows service to the user who
access the web page.
 
Back
Top