我正在安装多个.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>发布于 2013-04-17 22:53:58
因此,问题仍然是用户错误。第一个服务是.net Framework4.0。所有新的版本都是4.5。未安装Framework 4.5。
发布于 2013-04-17 22:11:57
在上面的例子中,我不得不猜测你的安装服务出了问题。你有了ServiceControl/@Wait='no',这意味着这4个服务几乎可以同时启动。有没有可能它们相互碰撞,只有一个在启动过程中幸存下来?
您可以考虑使用ServiceControl/@Wait='yes'或以其他方式调试服务。当错误对话框出现时,您应该能够看到并启动服务(通过命令行中的services.msc或sc.exe )。让错误对话框保持打开状态并进行调试,以查看可能出错的原因。
您的设置代码没有任何明显的错误。
PS:将如此多的文件,特别是其他可执行文件放在单个Component中并不是最佳实践。有关原因,请参阅Component Rules。
发布于 2016-02-22 19:14:59
请看我的回答。我为同样的问题挣扎了几个小时,https://stackoverflow.com/a/35510262/2903863
https://stackoverflow.com/questions/16045594
复制相似问题