keep track of folder's activities

I want to monitor the activities of all the folders present at "C:\Inetpub\ftproot\san".User can work on any type of files and not only text files.Since we have given 1GB space (lets say) to each user, so user can do anything to utilize this space.

Variable "id" is redirected to this page from previous page and according to this id the respective folder of user is opened in windows explorer.
Now I want to monitor the activites that the user will do in his folder like creating new file, deleting an existing file or editing a file.I want to monitor user's activities because i have to keep track of the space given to the user so tht i can restrict the user to use 1GB space only and not more than that.

I got this code over the internet and found it relevant to my work.

Question:
How and where to observe the functionality of this code.I m using ASP.NET and its a web based application.

I don't think its feasible to run FileSystemWatcher from a web application. All the callback methods are gone once the page finished processing a web request. The FileSystemWatcher will continue to run in a separate process after your page finished, but will not be able to call any of your code because the page class instance is destroyed and it may be unloaded from memory. I think that the code you posted was intended to be run under windows environment, not web. (Even event handlers write to Console.)

I think your best bet is to write a windows service that uses FileSystemWatcher to monitor folders and keeps all required info in a database. Then your ASP.NET applications can read/write values from/to the database to communicate with the windows service.

You can integrate a windows app with web app via a data store, such as the database.

Say, for example, you create a database with a table that stores the user's name, the amount of space allocated to that user, and the amount of space used by that user. This data will be updated by the windows app. Now, if your web app needs to display how much space a user is using, it can simply read the data for that user from the database.

In this scenario, only the windows app can update this data, while web app can only read it. Of course, there could be some data items that need to be read by windows app or written by both. That decision should be based on what the data is and how it is inteded to be used. For example, the web app may decide to increase the space allocated to a user (because the user paid for it over a web form), and the windows app will read that data whenever it needs to know the max allowed size.

Thanx ... the thing is all clear but can u provide any link(coding in C#) which uses FileSystemWatcher on windowsapplication, storing in a DataBase and webapplication retrives it ???
or
Is there any class analogous to FileSystemWatcher which directly supports WebApplication (ASP.NET) ????

Thanx ... the thing is all clear but can u provide any link(coding in C#) which uses FileSystemWatcher on windowsapplication, storing in a DataBase and webapplication retrives it ???
or
Is there any class analogous to FileSystemWatcher which directly supports WebApplication (ASP.NET) ????