手揣网教程:绿色安全纯净官方版,体验当今速度最快的浏览器!

处理ASP.NET创建的线程的用户改变引发的拒绝访问出错

时间:2024/12/17作者:未知来源:手揣网教程人气:

[摘要]ASP.NET创建的线程的用户由<identity impersonate="true"/> 改为NT AUTHORITY\NETWORK SERVICE, 引起&q...
 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创建的线程的用户改变引发的拒绝访问出错




Copyright © 2012-2018 手揣网教程(http://www.shouchuai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版