我的 Windows 服务应用程序安装项目中的错误 1001 [英] Error 1001 in my Windows Service app setup project

查看:52
本文介绍了我的 Windows 服务应用程序安装项目中的错误 1001的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Visual Studio 2008 安装和部署项目安装我的 Windows 服务应用程序.我创建了一个具有作为服务运行"权限的用户帐户,并将 ServiceProcessInstaller.Account 设置为 System.ServiceProcess.ServiceAccount.User 以及我之前创建的用户的用户名和密码.

I'm trying to install my Windows Service app using Visual Studio 2008 Setup and Deployment project. I have created a user account that has "Run as a Service" right and have set the ServiceProcessInstaller.Account to System.ServiceProcess.ServiceAccount.User and also the username and password to the user that I have created previously.

spInstaller.Account = System.ServiceProcess.ServiceAccount.User;
spInstaller.Username = "USER NAME";
spInstaller.Password = "PASSWORD";

sInstaller.ServiceName = "SERVICE NAME";
sInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;

但是在设置过程中,我收到以下错误:

But during the setup process, I get the following error:

错误:1001.帐户名无效或不存在,或指定帐户名的密码无效

任何想法为什么我会收到此错误以及如何修复它?谢谢.

Any ideas why I get this error and how I can fix it? Thanks.

推荐答案

您是否为您的用户名指定了域.IE.如果你的机器叫 FASTCAR 你试过了吗

Are you specifying a Domain for your UserName. I.e. if you machine is called FASTCAR have you tried

spInstaller.UserName = "FASTCAR\\UserName";

这篇关于我的 Windows 服务应用程序安装项目中的错误 1001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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