Windows 服务拒绝启动
我按照博客中给出的说明在 Windows 服务中托管了 WCF 双工服务 (netTcpBinding
): http://www.dotnetspark.com/kb/2096-step-by-step-hosting-wcf-service-with -nettcpbinding.aspx
一切都很顺利,直到我尝试启动该服务。当我尝试启动该服务时,出现以下错误:
由于以下错误,Service1 服务无法启动: 访问被拒绝。
有人可以对此提出任何想法吗?我有点截止日期了,如果能及时提供帮助,我们将不胜感激!
I have hosted a WCF duplex service (netTcpBinding
) in a Windows Service going by the instructions given in the blog : http://www.dotnetspark.com/kb/2096-step-by-step-hosting-wcf-service-with-nettcpbinding.aspx
All goes fine till the time I try to start the service. When I attempt to start the service it gives me an error given below:
The Service1 service failed to start due to the following error:
Access is denied.
Could anyone throw any ideas on this ? I am kinda on a deadline and prompt help would be appreciated !!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
访问被拒绝。有消息告诉我,用于服务的凭据无法访问磁盘或代码消耗的其他一些资源。
您是在系统帐户还是为此目的创建的特定服务帐户下运行该服务?
Access is denied. Something tells me the credentials used for the service do not have access to disk or some other resource consumed by your code.
Are you running the service under a system account or a specific service account you created for this purpose?
您需要调试服务或添加额外的日志记录才能查看错误是什么。
You need to debug the service or add additional logging in order to see what the error is.
我遇到了同样的错误,它最终与 NTFS 加密有关...有问题的服务是作为未在 NTFS EFS 下的该文件夹上获得授权的用户启动的。解决方案是从该目录中删除 EFS 或添加用户。
exton 对此进行了解释在这里。
I had the same error, and it ended up being related to NTFS encryption... the service in question was being started as a user not authorized on that folder under NTFS EFS. Solution is either to remove EFS from that directory or add the user.
exton explained it here.