Need to Impersonate user forAccessing Network resource, Asp.Net Account

前端 未结 5 1886
别那么骄傲
别那么骄傲 2020-12-10 20:55

I need to access a network resource on which only a given Domain Account has access. I am using the LogonUser call, but get a \"User does not have required priviliege\" exce

5条回答
  •  余生分开走
    2020-12-10 21:30

    Can you change the ACL protecting the network resource? A trick I've used in the past is to create an Active Directory group and then put the Computer Object into that group. I then use that group in the Access Control List of the object (file, share, etc) that I need to access.

    This has allowed me to run Windows Services as Local System and get access to the protected network resources. And this trick also seems to work for the ASP.NET process which runs as Network Service.

提交回复
热议问题