简体   繁体   English

将登录设置为管理员用户的模拟和运行服务是一回事吗?

[英]Does Impersonation and running service with logon set to Administrator user is same thing?

I have 1 windows service running on local machine under local system account. 我在本地系统帐户下的本地计算机上运行1 Windows服务。 This service is written in C#. 该服务用C#编写。 I am using impersonation in code to run service code under admin user context. 我在代码中使用模拟在管理员用户上下文下运行服务代码。 If I set logon of service to Administrator account and remove impersonation code from service, then still code will be run under admin user context ? 如果我将服务登录设置为管理员帐户并从服务中删除模拟代码,那么仍将在管理员用户上下文下运行代码? I mean whether these two approach are same or there is something different? 我的意思是这两种方法是相同的还是有所不同?

The 2 approaches are absolutely the same. 这两种方法绝对相同。 You could safely remove any impersonation code from your service and configure it to run under Administrator account in the management console. 您可以安全地从服务中删除任何模拟代码,并将其配置为在管理控制台的Administrator帐户下运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 模拟远程服务说用户'NT Authority \\ Anonymous Logon'登录失败 - Impersonation on remote service says Login failed for user 'NT Authority\Anonymous Logon' 当前登录用户在远程计算机上的WMI模拟 - wmi impersonation on remote computer as currently logon user 如何防止用户登录仅用于模拟的帐户? - How to prevent user from logon of an account used for impersonation only? 是否可以使用没有 windows 服务的服务帐户(域)在不同的用户(模拟)下运行代码? - Is running code under a different user (impersonation) possible with a service account (domain) without a windows service? 如何检查[UserName]和[Password]的用户是否是[DomainName]的域管理员而没有模拟? - How to check if user with [UserName] and [Password] is domain administrator of [DomainName] without impersonation? WCF模拟不是冒充管理员 - WCF impersonation is not impersonating an administrator 以管理员身份运行:访问用户VirtualStore - Running as administrator: access user VirtualStore 任务正在运行,使用SYSTEM还是Administrator用户? - Task running-use SYSTEM or Administrator user? 如果客户端上的异步代理执行完全相同的操作,为什么要实现异步服务 - Why to Implement Asynchronous Service if Asynchronous Proxies on client does the exact same thing 使用LOGON32_LOGON_NEW_CREDENTIALS进行Windows模拟的魔力是什么? - What is the magic to Windows impersonation with LOGON32_LOGON_NEW_CREDENTIALS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM