.net 2.0 servicecontroller.getservices()


i've got website windows authentication assent it. page website, users have ability start use does things database.



it works glorious me start use since i'm internal admin server. nonetheless i only user exam can't use started.



my doubt is:






does anyone know proceed list services specified mechanism name controlling opposite windows comment now logged with?






i unequivocally don't wish supplement users need start use windows organisation set internal admin iis server.....



here's formula i've got:



public stationary servicecontrollerstatus findservice()
{
servicecontrollerstatus station = servicecontrollerstatus.stopped;

try
{
twine machinename = configurationmanager.appsettings["servicemachinename"];
servicecontroller[] services = servicecontroller.getservices(machinename);
twine servicename = configurationmanager.appsettings["servicename"].tolower();

foreach (servicecontroller use services)
{
(service.servicename.tolower() == servicename)
{
station = service.status;
break;
}
}
}
catch(exception ex)
{
station = servicecontrollerstatus.stopped;
saveerror(ex, "utilities - findservice()");
}

relapse status;
}


my difference comes second line try block. here's error:




system.invalidoperationexception:
can't open use control manager on
mechanism 'server.domain.com'. this
operation competence need other
privileges. --->
system.componentmodel.win32exception:
opening denied --- finish inner
difference smoke-stack snippet --- at
system.serviceprocess.servicecontroller.getdatabasehandlewithaccess(string
machinename, int32
servicecontrolmanaqeraccess) at
system.serviceprocess.servicecontroller.getservicesoftype(string
machinename, int32 servicetype) at
telemarketingwebsite.utilities.startservice()




thanks help/info



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members