Windows Service doubt
-
hi, I need to write a background working app which can be installed on server (shared Server) So here some one suggested to write a windows service for this . I have written the coding in the start function of Service1.cs I have written
protected override void OnStart(string[] args) { ThreadStart Thstart = new ThreadStart(startfunction); mytheread = new Thread(Thstart); mytheread.Start(); // TODO: Add code here to start your service. }
but when i debug it its not getting executed .. i have the start function definition .. I have scour the web but was not able to find a proper solution. Please help me in this thanksIf You win You need not Explain............ But If You Loose You Should not be there to Explain......
-
hi, I need to write a background working app which can be installed on server (shared Server) So here some one suggested to write a windows service for this . I have written the coding in the start function of Service1.cs I have written
protected override void OnStart(string[] args) { ThreadStart Thstart = new ThreadStart(startfunction); mytheread = new Thread(Thstart); mytheread.Start(); // TODO: Add code here to start your service. }
but when i debug it its not getting executed .. i have the start function definition .. I have scour the web but was not able to find a proper solution. Please help me in this thanksIf You win You need not Explain............ But If You Loose You Should not be there to Explain......
install the service in your system. start the service. Click the "Tools" tab in Microsoft Visual Studio project. Click "Attach To Process" option. it will be show a list of services running in your system. Locate your service name and double click it. It will attach debugger to your service. Now when your service will run you will be able to debug it in your VS.Net project.
Regards, Kapil Thakur (Where's there is Kapil , there is a way) - thakur.kapil@gmail.com