Hello All,
I have been chasing a problem which i have narrowed down to be caused by the length of the ServiceName. Basically, when i would try to start my service in the VS2010 debugger, the service would start and die immediately.
I've narrowed it down to the following line
x.SetServiceName("DinRelayControlServiceName");
if i changed the line to
x.SetServiceName("DinRelayControlServiceNam");
(removed one character from the service name) it all works as expected
My initialisation code looks like
HostFactory.Run(x =>
{
x.Service<DoDinRelay>(s =>
{
s.ConstructUsing(name => new DoDinRelay());
s.WhenStarted(tc => tc.Start());
s.WhenStopped(tc => tc.Stop());
});
x.RunAsLocalSystem();
x.SetDescription("DinRelayControl using Topshelf");
x.SetDisplayName("DinRelayControl");
x.SetServiceName("DinRelayControlServiceName");
});
This only occurs when i am debugging it in Visual Studio 2010. If I install it as a service, the service name length doesn't affect the service operation
I am using
Topshelf v3.0.105.0,
and
.NET Framework v4.0.30319.1008
Is this a bug?
Thanks
Stuart