Windows Service Start Failure for self hosted SignalR

十年热恋 提交于 2019-12-12 01:47:16

问题


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.

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.

I know this has been raised a few times on SO but no other posts seems to help.

My command to install:

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.

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,


回答1:


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.

The link above is absolutely outstanding and gives great insight into Windows Services.



来源:https://stackoverflow.com/questions/30150285/windows-service-start-failure-for-self-hosted-signalr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!