开发者

C# run app as different user or schtasks auth

I was hoping I could get some input on the best way to handle authentication for my application. I have a C# form that has three buttons. One button is for querying tasks on a specific server, one button can start a task, and the last button can end a task.

My question involves the best way to do this for multiple users. I know I can add these users to the administrator group on each server but I really don't want to do this because these are all non-ad开发者_开发技巧min users. Also, I am running this against 3 different domains and multiple servers with no trusts.

Is there a way to either create a user that I can give admin rights on all of the servers and then run the C# app as this user (could be domain or local) or is there a better way to handle permissions for schtasks without giving admin rights?

I have researched impersonation but I don't think that does what I need unless I missed something.

Thank you,

Matt


You can use the runas command - this lets you set a user name and password to execute the application under.

You will still need to set the link up for each user/computer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜