running a windows service from asp

F

fred

I need a asp appli enabled to start/stop a web service

I'm using ServiceController for that, but encounter a
access denied problem when I try to start or stop the
service.

This problem is perfectely normal and well documented.
But I can't solve it.

My asp application ask for Windows authentification, my
account has the rights to control a windows service and I
check the Principal correspond to my account.

I wrote a strongnamed class to make the control, the asp
web page juste instanciate it.
This class is decorated with:

AllowPartiallyTrustedCallersAttribute
[assembly: PermissionSet
(SecurityAction.RequestMinimum,Unrestricted=true)]

in th .net administrator NMC plugin I associate this
assembly with the fulltrustpermission set
I check the right checkbox to tell .net just use this
codegroup.

What can I do more?

Thank you for helping
 
G

Guest

OK the solution is easier than I thought. It is
impersonation.

I completely misunderstood the difference between
this.User and System.Security.Principal.WindowsIdentity.
So I don't even tried sooner.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top