Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sir..

I install my windows service in other computer. I couldn't start service. It has an error. ie:

" Windows could not start the MyService service on Local Computer.

Error 1053: The service did not respond to the start or control request in a timely
fasion. "


When this service install in my system, it can start. But in other system it Can't start.


I Build the Service in Release Mode.


How to Solve this problem...? Please Help me....

What I have tried:

//Programe.cs

static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service1()
};
ServiceBase.Run(ServicesToRun);
}


//Service.cs

protected override void OnStart(string[] args)
       {
               timer1 = new Timer();
               this.timer1.Interval = 3000;
               this.timer1.Elapsed += new ElapsedEventHandler(timer1_Elapsed);
               timer1.Enabled = true;
               running = false;
               timer1.Start();

           }

       }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900