A
Amil
Don't answer this unless you know what you are talking about.
I want to use ServiceController in my code to start and stop a Windows
Service.
I do not want to use <impersonate> in my config file.
This means I must use the Framework Configuration to create Code Group and
Permissions.
I've attempted to create a new Code Group and have tried several different
pieces of
"evidence", but no matter what I have tried, I continue to get "access
denied".
Has anyone ever really done this before...the web is empty to this scenario
:-(
My code is:
[assembly:ServiceControllerPermissionAttribute(SecurityAction.RequestMinimum
, PermissionAccess=ServiceControllerPermissionAccess.Control)]
..
..
..
ServiceController sc = new ServiceController("myservicename");
sc.Start();
I want to use ServiceController in my code to start and stop a Windows
Service.
I do not want to use <impersonate> in my config file.
This means I must use the Framework Configuration to create Code Group and
Permissions.
I've attempted to create a new Code Group and have tried several different
pieces of
"evidence", but no matter what I have tried, I continue to get "access
denied".
Has anyone ever really done this before...the web is empty to this scenario
:-(
My code is:
[assembly:ServiceControllerPermissionAttribute(SecurityAction.RequestMinimum
, PermissionAccess=ServiceControllerPermissionAccess.Control)]
..
..
..
ServiceController sc = new ServiceController("myservicename");
sc.Start();