Re: Windows Service in C#

Tech-Archive recommends: Fix windows errors by optimizing your registry



<emanuelanechei@xxxxxxxxx> wrote in message news:d66f3e2d-0435-4c44-b5d8-04fd06fca9c1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
These days i'm creating a windows service in c# which reads some data
from a file and saves it in a database. The data in the file changes
every minute.
I am using FileSystemWatcher object which monitors that file for
LastWrite event.
The problem is that after the reading of file and writing the data in
the database the service quits unexpectedly.
What happends? I googled but found nothing about it.
Thank you in advance

Try running the service attached to the debugger, so that you can trace execution step by step and see where it is failing. To do this, start the service, and then from Visual Studio select Debug -> Attach to Process, and select the service that you started. In this way you can use the debugger against the service in the same way as if you were debugging a standard windows executable.

.



Relevant Pages

  • Re: pattern matching
    ... > database are used in this field and if so create a link to those words. ... > already showing the meaning of the word (taken from the meaning field). ... at the command prompt and *use the Perl debugger*. ... Proper indentation of the loops would help understanding of ...
    (comp.lang.perl.misc)
  • Data Abort & Prefetch Abort
    ... update the database (my SDF is on Secure Digital) the Debugger sometimes ... If i detach the debugger from my app, ... I always open/close connection when i talk to DataBase to ...
    (microsoft.public.dotnet.framework.compactframework)
  • Data Abort & Prefetch Abort
    ... update the database (my SDF is on Secure Digital) the Debugger sometimes ... If i detach the debugger from my app, ... I always open/close connection when i talk to DataBase to ...
    (microsoft.public.sqlserver.ce)
  • Re: break occurs no breakpoint set
    ... > but even though there is no breakpoint sent in the debugger, ... > arrow pointing to the first line of this exit handling routine. ... Also if I reload the database using the file ... > mode as if a breakpoint had been hit. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Multi person work on one PCB - Altium DXP 2004
    ... would need to IMMEDIATELY appear in all other users virtual database. ... listening for file changes even after you've opened a read only copy because ... As far as I can tell, ORCAD ... and after that it quits listening for file update messages. ...
    (sci.electronics.cad)