Windows Service Start Failure for self hosted Sign

2019-09-02 08:41发布

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条回答
Lonely孤独者°
2楼-- · 2019-09-02 09:25

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.

查看更多
登录 后发表回答