在看爬虫程序时,遇到了System.ServiceProcess.ServiceAccount.LocalSystem这样的代码,就查了查:
看了看在ServiecAccount中的定义
using System;
namespace System.ServiceProcess
{
// 摘要:
// 指定服务的安全上下文,安全上下文定义其登录类型。
public enum ServiceAccount
{
// 摘要:
// 充当本地计算机上非特权用户的帐户,该帐户将匿名凭据提供给所有远程服务器。
LocalService = 0,
//
// 摘要:
// 提供广泛的本地特权的帐户,该帐户将计算机的凭据提供给所有远程服务器。
NetworkService = 1,
//
// 摘要:
// 具有高特权级别的帐户。
LocalSystem = 2,
//
// 摘要:
// 由网络上特定的用户定义的帐户。如果为 System.ServiceProcess.ServiceProcessInstaller.Account
// 成员指定 User,则会使系统在安装服务时提示输入有效的用户名和密码,除非您为 System.ServiceProcess.ServiceProcessInstaller
// 实例的 System.ServiceProcess.ServiceProcessInstaller.Username 和 System.ServiceProcess.ServiceProcessInstaller.Password
// 这两个属性设置值。