Process start and Impersonation

后端 未结 4 1552
慢半拍i
慢半拍i 2021-02-09 08:51

I have problem with starting processes in impersonated context in ASP.NET 2.0.

I am starting new Process in my web service code. IIS 5.1, .NET 2.0

[WebMe         


        
4条回答
  •  一向
    一向 (楼主)
    2021-02-09 09:31

    You might also try wrapping your code inside

    using (Impersonator person = new Impersonator("domainName", "userName",
    "password")
    {
        // do something requiring special permissions
    }
    

    as mentioned in http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic62740.aspx

提交回复
热议问题