当前位置:雨林木风下载站 > 网页设计教程 > 详细页面

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

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

更新时间:2025-12-25 文章作者:未知 信息来源:网络 阅读次数:

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


温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行