One caveat with an automated dumping of files to a directory as part of an
app (which is probably not related to your problem, but I'm FYIing you), is
that there is a limitation to the number of files that can be in a windows
folder--this was discussed on this list last year, I believe; search the
archives--I think it's around 16K, so be aware if you're not cleaning up.

HTH


Steve Holak
Senior Software Architect

Brokerage Concepts IS Dept.
610-491-4879

email:  [EMAIL PROTECTED]



                    Don Davis
                    <dondavis@TEXASHEA        To:     [EMAIL PROTECTED]
                    LTH.ORG>                  cc:
                    Sent by: The              Subject:     [DOTNET] Problem with 
Service and File System Watcher
                    DOTNET list will
                    be retired 7/1/02
                    <[EMAIL PROTECTED]
                    VELOP.COM>


                    06/12/2002 12:19
                    PM
                    Please respond to
                    The DOTNET list
                    will be retired
                    7/1/02






Hello all.

Relatively new to the realm of Net and C# so please excuse any greenhorn
practices.

Having trouble with a Service we wrote (c#) which incorporates the File
System Watcher.

Service is setup to watch for "created" files only.

All files are small text files.   Each file is opened and "processed".
Processing involves reading through the file to determine some header info
which is then used to insert/update a table in SQL.

Service works fine until we dump 50+ files into the watched "Path"
directory.

At this point it will process a varied number of files. Sometimes 1 or 2,
sometimes half, rarely all and then appears to "stop" or "miss the
remaining files".

I have put all code in a try catch to write any error to the event log.
Nothing is written to the log.

Originally thought that the service was getting the event that the file was
created but couldn't "open" the file.
If that's the case I thought I would see an error.  No errors.  Wrote a
routine to test to open the file and return the filestream anyway. Still no
errors.

If i comment out the line that calls our "Process" routine, then all files
are "seen"

Any suggestions would be appreciated.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to