Windows Service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kuldeep

    #1

    Windows Service

    Framework: Visual Studio 2005
    Language: C#.NET

    Hi All,

    I would llike to write a Windows Service which does the follwing steps:
    1. Look for any PDF files from a location
    2. Collect all the PDF files and move them to another location.

    This service will run in a location where our web application will be
    hosted. So automatically, there would be quite a few requests which will be
    invoked and there would be a case where the "CPU Utilization" of the server
    will reach 100% more often than not.

    How do I write a very effecient, effective Windows Service to complete the
    above mentioned tasks?

    Along with this, if there are some good links from where I can gather all
    the information about writing good Windows Services, please share it with
    me.

    Thanks in advance,
    Kuldeep




  • John Timney \(MVP\)

    #2
    Re: Windows Service

    well you only really need a filesystemwatch er to check for changes to youer
    location, and see if any new PDF files exist. Lots of examples around.

    http://msdn2.microsoft.com/en-us/lib...emwatcher.aspx

    Couple that with some code to evaluate perfmon and you should be able to
    determine how busy your system is to stop your file copies from happening
    until more CPU is free.

    http://msdn2.microsoft.com/en-us/lib...16(VS.71).aspx

    Regards

    John Timney (MVP)




    "Kuldeep" <kuldeep.vijayk umar@hotmail.co mwrote in message
    news:uUHR528QIH A.3556@TK2MSFTN GP03.phx.gbl...
    Framework: Visual Studio 2005
    Language: C#.NET
    >
    Hi All,
    >
    I would llike to write a Windows Service which does the follwing steps:
    1. Look for any PDF files from a location
    2. Collect all the PDF files and move them to another location.
    >
    This service will run in a location where our web application will be
    hosted. So automatically, there would be quite a few requests which will
    be invoked and there would be a case where the "CPU Utilization" of the
    server will reach 100% more often than not.
    >
    How do I write a very effecient, effective Windows Service to complete the
    above mentioned tasks?
    >
    Along with this, if there are some good links from where I can gather all
    the information about writing good Windows Services, please share it with
    me.
    >
    Thanks in advance,
    Kuldeep
    >
    >
    >
    >

    Comment

    Working...