Posted on: 9/9/2015 4:40:09 PM | Views : 1034

Hello,
I have a written a asp.net web application, using Visual studio 2012, c#. Now, I want to monitor a particular directory, for new files created in it. For example *.csv files. Once a new file is created, I want a specific page in the Web application to immediately detect the file name, and read it, and display it.
I am aware of the FileSystemWatcher class.  I was thinking may be I can use it in the Web Application. My Idea, is that when the Submit button in a specific Web Page in my web application gets clicked, I create the object of the FileSytemWatcher. Etc.
But I read some where that Instantiating the FileSystemWatcher object in a Web Form is not recommended.  1) Can you please tell, what problems I can expect if I instantiated the FileSystemWatcher object in a form
2) if my approach is not right, then what is the best way to accomplish my goal, of monitoring a folder for new files and then telling ASP.net web application about ...

Go to the complete details ...