A
Andy
Hello,
I would like to access to Windows Service via ASP.NET. I have written
very simple web application which starts and stops windows service. Here
is my StarButton event:
private void StartButton_Click(object sender, System.EventArgs e)
{
ServiceController sc = new ServiceController();
sc.ServiceName = "MyService";
sc.Start();
}
When I try to start Windows Service I receive the following error:
System.ComponentModel.Win32Exception: Access is denied.
How to set up my web application or my Windows Service to have a
perrmission to stoping or starting Windows Service via ASP.NET. I'm
newbie in Windows Services and I would ask You for help.
Thank You in advance.
Andy
I would like to access to Windows Service via ASP.NET. I have written
very simple web application which starts and stops windows service. Here
is my StarButton event:
private void StartButton_Click(object sender, System.EventArgs e)
{
ServiceController sc = new ServiceController();
sc.ServiceName = "MyService";
sc.Start();
}
When I try to start Windows Service I receive the following error:
System.ComponentModel.Win32Exception: Access is denied.
How to set up my web application or my Windows Service to have a
perrmission to stoping or starting Windows Service via ASP.NET. I'm
newbie in Windows Services and I would ask You for help.
Thank You in advance.
Andy