I am working on developing a SignalR Hub as a Windows service.
However, I am encountering issues with the installer as it uses the Project.dll to initialize the service instead of the Project.exe.
To test this, I used the CMD commands “sc create TestServer binPath=” to create a service that uses the Project.exe and another one that uses the Project.dll.
With the exe, I can start the service, but with the dll, I face the same problem as with the installer. Therefore, I suspect that the installer is causing the issue.
The code for the installation is as follows:
<Component Id="SDCommunicationHub">
<File Id="SDCommunicationHub" Source="$(var.SDCommunicationHub.TargetPath)" />
<ServiceInstall Type="ownProcess" Name="SDCommunicationHub" DisplayName=" SDCommunicationHub" Description="Communication between PC and server" Start="auto" Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" ErrorControl="normal" Vital="yes" />
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="SDCommunicationHub" Wait="no" />
<ServiceConfig ServiceName="SDCommunicationHub" OnInstall="yes" DelayedAutoStart="yes" />
</Component>
I am grateful for any help, maybe I am making a mistake and it’s not possible this way.