G
Guest
The following error occurs on trying to start a Windows Service that is based
on a C# application I am writing:
[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely
fashion.
My application has the install section setup as described in many different
documents. And it does install sucessfully as "LocalSystem" and "Automatic".
[SC] GetServiceConfig SUCCESS
SERVICE_NAME: autobackup
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : "I:\Program Files\Filebackup\AutoBackup.exe"
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : AutoBackup
DEPENDENCIES :
SERVICE_START_NAME : LocalSystem
Microsoft's documentation states that on a Service start request, OnStart()
is called and must return within 30 seconds; otherwise, the aforementioned
error will occur.
The OnStart section of my code, for testing, just has an entry to write to
the application event log and that is all, so I am rather puzzled as to why
it should not return from OnStart within 30 secs.
protected override void OnStart(string[] args)
{
EventLog.WriteEntry("AutoBackupScheduler",
DateTime.Now.ToLongTimeString() + " - Started.");
}
I have tried various suggestions of adding the application directory to the
System path and to set the login to a userid and password rather than
"LocalSystem" but to no avail.
As this kind of thing cannot be debugged, at least in any way I know of, I
am enquiring of the general community to see if there are any further
suggestions.
By the way, there are no dependencies as least that I am aware of (i.e, no
required DLL's that I have created).
Thanks very much for any assiastance and have a great day!!!
on a C# application I am writing:
[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely
fashion.
My application has the install section setup as described in many different
documents. And it does install sucessfully as "LocalSystem" and "Automatic".
[SC] GetServiceConfig SUCCESS
SERVICE_NAME: autobackup
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : "I:\Program Files\Filebackup\AutoBackup.exe"
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : AutoBackup
DEPENDENCIES :
SERVICE_START_NAME : LocalSystem
Microsoft's documentation states that on a Service start request, OnStart()
is called and must return within 30 seconds; otherwise, the aforementioned
error will occur.
The OnStart section of my code, for testing, just has an entry to write to
the application event log and that is all, so I am rather puzzled as to why
it should not return from OnStart within 30 secs.
protected override void OnStart(string[] args)
{
EventLog.WriteEntry("AutoBackupScheduler",
DateTime.Now.ToLongTimeString() + " - Started.");
}
I have tried various suggestions of adding the application directory to the
System path and to set the login to a userid and password rather than
"LocalSystem" but to no avail.
As this kind of thing cannot be debugged, at least in any way I know of, I
am enquiring of the general community to see if there are any further
suggestions.
By the way, there are no dependencies as least that I am aware of (i.e, no
required DLL's that I have created).
Thanks very much for any assiastance and have a great day!!!