| 解决ASP.NET创建的线程的用户改变引发的拒绝访问错误
|
| 〖双击滚屏,单击停止〗〖放大字体〗〖缩小字体〗 |
|
ASP.NET创建的线程的用户由 改为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
|
|
文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。
如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
编辑EMAIL:emroom@126.com,谢谢! |
|
|