系统错误 5 启动 .NET 服务时拒绝访问 [英] System error 5 Access is denied when starting a .NET service

查看:38
本文介绍了系统错误 5 启动 .NET 服务时拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试启动在 Visual Studio 中创建的服务时,收到以下错误:

When I try to start a service I created in Visual Studio I receive the following error:

System error 5 has occurred.

Access is denied.

我正在以提升的权限运行命令行,所以这不是那个问题.有什么地方可以查看发生了什么错误.

I am running the command line with elevated privileges, so it's not that problem. Is there any place I can look to see what error is occuring.

推荐答案

为了让它工作,我需要为我的服务项目的输出 bindebug 文件夹添加权限.

To get it to work I needed to add permissions to the output bindebug folder for my service project.

本地服务帐户没有输出 .exe 文件的权限,这就是发生错误的原因.

The Local Service account didn't have permissions to the output .exe file, and this was why the error was occuring.

这篇关于系统错误 5 启动 .NET 服务时拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆