简体   繁体   English

自托管SignalR的Windows服务启动失败

[英]Windows Service Start Failure for self hosted SignalR

Really trying to figure out how to install a SignalR Self Host windows service. 确实试图弄清楚如何安装SignalR Self Host Windows服务。 It's my first attempt with a windows service and it's driving me bonkers. 这是我第一次尝试Windows服务,这使我疯狂。 After many failed attempts, I really could do with some help. 经过多次失败的尝试,我确实可以提供一些帮助。 I'm using cmd in a windows server 2012 environment. 我在Windows Server 2012环境中使用cmd。

The error in a traditional win popup: 传统的胜利弹出窗口中的错误:

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. 必须先安装Windows Service(使用installutil.exe),然后使用ServerExplorer,Windows Services管理工具或NET START命令启动。

I know this has been raised a few times on SO but no other posts seems to help. 我知道这已经在SO上提出了几次,但似乎没有其他帖子有帮助。

My command to install: 我的安装命令:

C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319 InstallUtil.exe C:\\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. 这不是安装过的东西,我最初认为是必须安装的,因此我将启动该服务,但未找到任何服务。

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. 我有两个版本的Windows服务,我正在尝试安装/启动自己的版本,还有一个来自Microsoft的示例,都无法正常工作。

https://code.msdn.microsoft.com/windowsapps/SignalR-self-hosted-in-6ff7e6c3 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. 因此,我倾向于未正确配置我的环境。

Any help greatly appreciated! 任何帮助,不胜感激!

Regards, 问候,

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/ 尽管这也不是直接解决的问题,但我确实相信它可能会在将来对许多人有所帮助: 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. 它通过我大力地通过链接解决了我的问题。

The link above is absolutely outstanding and gives great insight into Windows Services. 上面的链接绝对出色,可深入了解Windows服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM