如何获取web的运行帐户名称
地球修理员 2012-03-16 04:15:45 需要写一个程序,模拟当前登录用户的权限去某远程目录上取文件
我现在用的是以下方法,但是部署的时候还是说访问不到文件
System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();
请问有什么办法能打出这段代码运行前后的系统运行帐户名么?