在代码中模拟IIS帐户,这个问题对我来说看来挺复杂,快告诉我吧!别折腾我了!!!!!!!!
WEB.CONFIG:
<authentication mode="Windows"></authentication>
*.CS
...
System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate();
....
impersonationContext.Undo();
错误信息:"匿名标识不能执行模拟。 "
我设置了,<authentication mode="Windows"></authentication>还要怎么做呢?