Search code examples
c#.netweb-servicessoapfilesystemwatcher

C# .net windows service to communicate with remote web service


I have a requirement which i'm not is actually achieveable in C# / .net.

This is what i have to do:

  • Write a C# windows service which runs constantly and monitors a folder
  • Upon changes it initates and parses files in that folder
  • Take this file and pass it to the remote web service (soap encapsulation).

It seems pretty simple but if its not possible to do this I'm open to other easier or better solutions.


one thing i would add is file is actually sitting on FTP folder not a regular folder.


Solution

  • yes it is possible

    1. FileSystemWatcher lets you monitor file system changes
    2. A example of WCF upload file sample