开发者

How to open an exe in asp.net using impersonation

开发者 https://www.devze.com 2023-03-21 14:11 出处:网络
I want to open a file(.exe) at client side which is placed on public network. I can use impersonation but i am not findin开发者_StackOverflowg any way? Use the Process class with ProcessStartInfo and

I want to open a file(.exe) at client side which is placed on public network. I can use impersonation but i am not findin开发者_StackOverflowg any way?


Use the Process class with ProcessStartInfo and set the UserName and Password before starting it.

ProcessStartInfo startInfo = new ProcessStartInfo("Path to exe");
startInfo.UserName = "the user to impersonate";
startInfo.Password = "the password in a SecureString";

Process.Start(startInfo);
0

精彩评论

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