Jump to content

Recommended Posts

Posted

Original file here

 

Hi guys.

 

I am trying to develop a simle windows service (my first windows service) that watches a folder on a server. It uses the System.IO.FileSystemWatcher class to watch a folder, with only the created event raised and the FileName NotifyFilter.

 

The thing is, it works for the first 1-3 files I drop into the folder, imports into the DB without issues.

 

But when I drop the 4th file and onwards, I get a file is locked error.

 

I am always dropping in new files, not files that are already in the folder.

 

Anyone have an idea as to why the files are beging locked ?

 

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...