serviceProcessInstaller1
全部标签 我有一项服务,在安装时会将Myapp.exe.config文件(基于app.config文件生成)放入安装目录。在安装过程中,我需要此文件的详细信息来配置安装。特别是我需要调整我服务的ServiceProcessInstaller实例的帐户/用户名/密码字段,以便在它运行时以特定用户身份运行。但是,在安装过程中,安装程序尚未设置我的注册表设置,也没有将我的Myapp.exe.config复制到安装目录...所以我无法提取这些值,这意味着我的服务无法安装作为正确的用户。我现在能做到的唯一方法是将用户/传递值硬编码到ProjectInstaller类中,但我不能让自己这样做。这是错误的。是
我在生产中遇到了一个奇怪的问题,Windows服务随机挂起,如果您能帮助我分析根本原因,我将不胜感激。该服务是用C#编写的,并部署到装有.NET4.5的机器上(尽管我也可以用.NET4.5.1重现它)。报错是:ProbableI/Oraceconditiondetectedwhilecopyingmemory.TheI/Opackageisnotthreadsafebydefault.Inmultithreadedapplications,astreammustbeaccessedinathread-safeway,suchasathread-safewrapperreturnedby
我创建了一个将帐户设置为用户的Windows服务。这意味着当我安装该服务时,我需要传递用户名和密码。有没有办法在ProjectInstaller类中或在BeforeInstall事件中设置这些?如果是这样怎么办? 最佳答案 项目安装程序的以下添加将在安装期间分配服务登录信息。publicProjectInstaller(){InitializeComponent();serviceProcessInstaller1.Account=System.ServiceProcess.ServiceAccount.;serviceProces
当我开始使用installutil安装时出现以下错误,我已经设置了ServiceInstaller和ServiceInstallerProcess,System.InvalidOperationException:InstallationfailedduetotheabsenceofaServiceProcessInstaller.TheServiceProcessInstallermusteitherbethecontaininginstaller,oritmustbepresentintheInstallerscollectiononthesameinstallerastheSer
我不明白System.ServiceProcess.ServiceProcessInstaller和System.ServiceProcess.ServiceInstaller之间的区别。来自元数据:第一个安装可执行文件,第二个安装类。在阅读了MSDN的示例之后,其中有一个ServiceProcessInstaller和两个具有不同ServiceName的ServiceInstaller(s),我完全迷路了。有明确的解释吗? 最佳答案 一个可执行文件实际上可能包含多个服务。在这种情况下,您将有一个代表每个服务的ServiceInst