需要写一个程序,模拟当前登录用户的权限去某远程目录上取文件我现在用的是以下方法,但是部署的时候还是说访问不到文件
System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();请问有什么办法能打出这段代码运行前后的系统运行帐户名么?
System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();请问有什么办法能打出这段代码运行前后的系统运行帐户名么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货