Error 1053: the service did not respond to the start or control request in a timely fashion

后端 未结 30 1244
無奈伤痛
無奈伤痛 2020-11-29 18:47

I have recently inherited a couple of applications that run as windows services, and I am having problems providing a gui (accessible from a context menu in system tray) wit

30条回答
  •  爱一瞬间的悲伤
    2020-11-29 19:20

    In my case, I had this trouble due to a genuine error. Before the service constructor is called, one static constructor of member variable was failing:

        private static OracleCommand cmd;
    
        static SchedTasks()
        {
            try
            {
                cmd = new OracleCommand("select * from change_notification");
            }
            catch (Exception e)
            {
                Log(e.Message); 
                // "The provider is not compatible with the version of Oracle client"
            }
        }
    

    By adding try-catch block I found the exception was occuring because of wrong oracle version. Installing correct database solved the problem.

提交回复
热议问题