自托管 SignalR 的 Windows 服务启动失败 [英] Windows Service Start Failure for self hosted SignalR
问题描述
真的想弄清楚如何安装 SignalR 自托管 Windows 服务.这是我第一次尝试使用 Windows 服务,它让我发疯.经过多次失败的尝试,我真的可以得到一些帮助.我在 Windows Server 2012 环境中使用 cmd.
Really trying to figure out how to install a SignalR Self Host windows service. It's my first attempt with a windows service and it's driving me bonkers. After many failed attempts, I really could do with some help. I'm using cmd in a windows server 2012 environment.
传统 win 弹出窗口中的错误:
The error in a traditional win popup:
无法从命令行或调试器启动服务.一个窗户必须首先安装服务(使用 installutil.exe),然后从 Windows 服务管理工具 ServerExplorer 开始或 NET START 命令.
Cannot start service from the command line or debugger. A windows Service must first be installed(using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.
我知道这已经在 SO 上提出了几次,但似乎没有其他帖子有帮助.
I know this has been raised a few times on SO but no other posts seems to help.
我的安装命令:
C:\Windows\Microsoft.NET\Framework\v4.0.30319 InstallUtil.exeC:\SignalRService\bin\Debug\RW.WinServ.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319 InstallUtil.exe C:\SignalRService\bin\Debug\RW.WinServ.exe
这不是安装什么,我原本以为,它必须安装,所以我会去启动服务但没有找到服务.
This is not installing what so ever and I originally thought, it must of installed so I'll go an start the service but no service found.
我有两个版本的 Windows 服务,我正在尝试安装/启动我自己的版本和一个来自 Microsoft 的示例,但都不起作用.
I have two versions of the windows service I'm trying to install/start my own version and an example taken from Microsoft, neither work.
https://code.msdn.microsoft.com/windowsapps/SignalR-self-hosted-in-6ff7e6c3
我希望已经提供了足够的信息来帮助我诊断问题.如果需要任何代码,请给我留言.但是,即使使用上述链接中的源代码,我也无法使其正常工作.所以我倾向于我的环境没有正确配置.
I hope enough information has been supplied to help me diagnose the problem. If any code is required then please give me a shout. But again even with the source code from the above link, I cannot get this to work. So I'm leaning towards my environment not being properly configured.
非常感谢任何帮助!
问候,
推荐答案
虽然这不是我所面临的问题的直接答案,但我相信它可能在未来对许多人有所帮助:https://damienbod.wordpress.com/2014/06/03/signalr-self-hosting-template-for-a-windows-service/
Although this is not a direct answer too the problem I was facing, I do believe it may help many in the future: https://damienbod.wordpress.com/2014/06/03/signalr-self-hosting-template-for-a-windows-service/
它通过我大力浏览链接解决了我的问题.
It solved my issue by me vigorously going through the link.
上面的链接非常出色,可以深入了解 Windows 服务.
The link above is absolutely outstanding and gives great insight into Windows Services.
这篇关于自托管 SignalR 的 Windows 服务启动失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!