-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service did not respond to the start or control request in a timely fashion #109
Comments
I am having same error with the latest version also 2.0.9 version of PeterKottas.DotNetCore.WindowsService library. |
I have this trouble too upd |
Quite a common problem. My solution was to implement an own descendant of MicroService class where I've started a RunOnceTimer with all the initialization, IoC with assembly scanning, Akka, Nancy in a callback method. Not before or during Run(). Basically, you start a separate thread (like timer) and immediately tell Windows you're all done loading. |
Im having this problem too. @Apostol59 could you elaborate on your solution? |
@kalimist123, no problem, bro.
//from example
void Main()
{
//old di configuration
ServiceRunner<ExampleService>.Run(config =>
{
var name = config.GetDefaultName();
config.Service(serviceConfig =>
{
serviceConfig.ServiceFactory((extraArguments, microServiceController) =>
{
return new ExampleService();
});
serviceConfig.OnStart((service, extraArguments) =>
{
//now di configuration
Console.WriteLine("Service {0} started", name);
service.Start();
});
...
}
} |
@Apostol59 thank you |
I was running into this error as well, however I was hitting it immediately when starting the service, it wasn't waiting 30 seconds. The issue was that I was using Network Service instead of Local System to run the windows service, must have been some sort of permissions issue... |
@Apostol59 I am having same error with the latest version of PeterKottas.DotNetCore.WindowsService library. can you please help me.. |
@sagar-patel-sls |
Hii @PeterKottas I am having same error with the latest version of PeterKottas.DotNetCore.WindowsService library. can you please help me.. |
I know this issue was raised before but currently I am also facing the same issue and I have tried all the solutions provided in #13 but no luck. Most annoying part here is the code base is same in master branch and my current branch. I just added few arguments to pass while running the program however the code to install/start/stop/uninstall service is the same. I am able to install and run service from master branch code base. But I am getting below error while trying to start service via command-line in my current branch. I am running this program in administrator terminal and also my basedirectory path does not contain space.
Even If I try to run the installed process from user interface it gives me below error.
I am using 2.0.8 version of PeterKottas.DotNetCore.WindowsService library.
What could be the reason here?
The text was updated successfully, but these errors were encountered: