我正在安装多个.net Windows服务。所有服务都将所有依赖项安装在相应的文件夹中。但是,只有第一个会运行。其他服务给出错误1053:服务没有及时开始响应或控制请求。
思想?
编辑:这不需要30秒。它发生在大约1秒钟内。
编辑:
<ComponentGroup Id="IngestServiceComponents" Directory="IngestINSTALLFOLDER">
<Component Id="IngestService" Guid="5a95ee28-c9da-46b9-8396-cef98fa8fcbb">
<File Id="IssueIngestService.exe" Name="IngestService.exe" Source="..\IngestService\bin\Release\IngestService.exe" Vital="yes" KeyPath="yes" DiskId="1"/>
<File Id="IngestService.exe.config" Name="IngestService.exe.config" Source="..\IngestService\bin\Release\IngestService.exe.config" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="Libraries2_1" Name="Libraries2.dll" Source="..\IngestService\bin\Release\Libraries2.dll" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="DLibraries2_1" Name="DLibraries2.dll" Source="..\IngestService\bin\Release\DLibraries2.dll" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="ICSharpCode.SharpZipLib_1" Name="ICSharpCode.SharpZipLib.dll" Source="..\..\Assemblies\ICSharpCode.SharpZipLib.dll" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="ChilkatDotNet45_1" Name="ChilkatDotNet45.dll" Source="..\..\Assemblies\ChilkatDotNet45.dll" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="MediaInfo_1" Name="MediaInfo.dll" Source="..\..\Assemblies\MediaInfo.dll" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="XmpToolkit_1" Name="XmpToolkit.dll" Source="..\..\Assemblies\XmpToolkit.dll" Vital="yes" KeyPath="no" DiskId="1"/>
<File Id="ffmpeg.exe_1" Name="ffmpeg.exe" Source="..\..\Assemblies\ffmpeg.exe" Vital="yes" KeyPath="no" DiskId="1"/>
<ServiceInstall
Id="IngestServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="IngestService"
DisplayName="Ingest"
Description="Ingest Service"
Start="auto"
Account="user"
Password="password"
ErrorControl="ignore"
Interactive="no">
</ServiceInstall>
<ServiceControl Id="IngestStartService" Stop="both" Remove="uninstall" Name="IngestService" Wait="no" />
</Component>
</ComponentGroup>
答案 0 :(得分:0)
鉴于上面的例子,我不得不猜测你的安装服务出了什么问题。你有ServiceControl/@Wait='no'
,这意味着4个服务几乎可以同时启动。它们是否可能相互碰撞,只有一个在启动时幸存下来?
您可以考虑使用ServiceControl/@Wait='yes'
以及调试服务。出现错误对话框时,您应该能够查看并启动服务(通过命令行中的services.msc
或sc.exe
)。保持错误对话框并调试以查看可能出现的问题。
您的设置代码没有任何明显错误。
PS:将多个文件(尤其是其他可执行文件)放在一个Component
中并不是最佳做法。请参阅Component Rules了解原因。
答案 1 :(得分:0)
因此问题是像往常一样的用户错误。第一项服务是.net Framework 4.0。所有新的都是4.5。未安装Framework 4.5。
答案 2 :(得分:0)
在这里看看我的答案。几个小时我一直在努力解决同样的问题 https://stackoverflow.com/a/35510262/2903863