Problem running service on win2k8
-
Hi All, I have a service application which runs well on win2k3 with Local System Account. When I tried to use the same service on Win2k8 server if failed with Local System Account. It says "The service did not respond to the start or control request in a timely fashion." This service works under domain administrator account. Now I want to run the service as Local System account on win2k8 server.What and where i need to do changes? Service is developed in C++ unmanaged code. Please let me know if anymore information required. Regards, Mahesh R. Kulkarni
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.
-
Hi All, I have a service application which runs well on win2k3 with Local System Account. When I tried to use the same service on Win2k8 server if failed with Local System Account. It says "The service did not respond to the start or control request in a timely fashion." This service works under domain administrator account. Now I want to run the service as Local System account on win2k8 server.What and where i need to do changes? Service is developed in C++ unmanaged code. Please let me know if anymore information required. Regards, Mahesh R. Kulkarni
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.
The problem could be anything involved with the startup of the service. Do you have access to the source code? You could add logging statements to the startup code to see where it's hanging up.
-
The problem could be anything involved with the startup of the service. Do you have access to the source code? You could add logging statements to the startup code to see where it's hanging up.
Hi Richard, Thanks for the reply. I observed that it doesn't reach to service's main function also.I checked this with OutputdebugString logs. Surprisingly it works fine Domain Administrator account which can be configured by 'This Account' from service properties. And one more thing, same piece of code works on Windows 2003 Server. I suspect that there is something which changed in Windows Server 2008. But I am really stuck here. I googled a lot but can't find the pointer for this. Please let me know if you require any other information on this. Thanks in advance.
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.
-
Hi Richard, Thanks for the reply. I observed that it doesn't reach to service's main function also.I checked this with OutputdebugString logs. Surprisingly it works fine Domain Administrator account which can be configured by 'This Account' from service properties. And one more thing, same piece of code works on Windows 2003 Server. I suspect that there is something which changed in Windows Server 2008. But I am really stuck here. I googled a lot but can't find the pointer for this. Please let me know if you require any other information on this. Thanks in advance.
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.
Can you post the code that it runs at startup, if it's not too much? There must be some resource that it's trying to access that it's not being granted permission for.
-
Can you post the code that it runs at startup, if it's not too much? There must be some resource that it's trying to access that it's not being granted permission for.
Sure I will update pseudo code tomorrow. Is it ok if I mail it to you. Regards, Mahesh
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.
-
Sure I will update pseudo code tomorrow. Is it ok if I mail it to you. Regards, Mahesh
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.
No, it would be better if you posted it here so that everyone has a chance to help you.
-
No, it would be better if you posted it here so that everyone has a chance to help you.
void main(void)
{
OutputDebugString("Entering : void main(void)");
SERVICE_TABLE_ENTRY Service_Table_Entry[] = {
{ (LPTSTR) SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION) ServiceMain },
{ 0, 0 },
};
hThread = NULL; // Thread for the actual work
hServiceEventDone = NULL; // Event used to keep ServiceMain from completing
hThreadServiceDone = NULL; // Event set by ServiceThread indicates exitedStartServiceCtrlDispatcher(Service\_Table\_Entry) OutputDebugString("Exiting : void main(void)");
}
This is the entrypoint of the service. If I run this service by Domain\administrator account debugview shows "Entering : void main(void)" entry. But, When I try to run this service as Local System Account it not even reaches to "Entering : void main(void)" statement. Thanks in advance. Mahesh R. Kulkarni
The secret of life is not enjoyment but education through experience. - Swami Vivekananda.