简体   繁体   English

WCF Windows服务权限问题

[英]WCF Windows service permissions problem

I have created a WCF service and hosted it using Windows Services host. 我已经创建了WCF服务,并使用Windows Services主机托管了它。 To install the project I created an installation project (as described here ). 要安装的项目,我创建了一个安装工程(如描述在这里 )。 In the tutorial, it says to define in the ProjectInstaller.cs the serviceProcessInstaller1 Account property to be Network Service . 在本教程中,它说要在ProjectInstaller.cs中将serviceProcessInstaller1 Account属性定义为Network Service When using this setting the service did not started on the server. 使用此设置时,服务未在服务器上启动。 When I tried to start the process manually, it immediately returned to stopped state. 当我尝试手动启动该过程时,它立即返回到停止状态。
After when I changed the Account to LocalSystem the service works properly. 帐户更改为LocalSystem之后,该服务将正常运行。 My questions are: 我的问题是:

  1. Any ideas why it won't work with Network Service account? 有什么想法为什么不能与网络服务帐户一起使用?
  2. What are the security implications of using a server with LocalSystem account? 将服务器与LocalSystem帐户一起使用对安全性有何影响? This server is used locally in the intranet as a reporting server for other servers. 该服务器在Intranet中本地用作其他服务器的报告服务器。
  1. Network Service does not have proper priviligies to run a WCF host using named pipes (see http://weblogs.thinktecture.com/cweyer/2007/12/dealing-with-os-privilege-issues-in-wcf-named-pipes-scenarios.html ). 网络服务没有适当的特权来使用命名管道运行WCF主机(请参阅http://weblogs.thinktecture.com/cweyer/2007/12/dealing-with-os-privilege-issues-in-wcf-named-pipes) -scenarios.html )。
  2. See http://www.windowsitpro.com/article/services/understanding-the-local-service-and-network-service-accounts.aspx for a description about the differences between those accounts. 有关这些帐户之间差异的说明,请参见http://www.windowsitpro.com/article/services/understanding-the-local-service-and-network-service-accounts.aspx The LocalSystem is a local administrative account that can cause a lot of trouble if exploited by an attacker. LocalSystem是一个本地管理帐户,如果被攻击者利用,可能会造成很多麻烦。 The Network Service account has much less access and is because of that better to use. 网络服务帐户的访问权限要少得多,因此使用起来更好。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM