解决ASP.NET创建的线程的用户改变引发的拒绝访问错误
时间:2007-01-21 14:04:40
来源: 作者: 点击:次 出处:技术无忧
关键字:解决
ASP.NET创建的线程的用户由<identity impersonate="true"/> 改为NT AUTHORITY/NETWORK SERVICE, 引起"System.UnauthorizedAccessException","拒绝访问" Dim thr As Threading.Thread
Dim l As System.Security.Principal.WindowsIdentity
Function print()
thr = New Threading.Thread(AddressOf printAutoCAD)
thr.Start()
l = System.Security.Principal.WindowsIdentity.GetCurrent
End Function
Private Sub printAutoCAD()
System.Security.Principal.WindowsIdentity.Impersonate(l.Token)
...
End Function

上一篇:在ASP.NET中实现弹出日历











文章评论
共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面