Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old March 9th, 2004, 10:25 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Well, like I said, I think a FileSystemWatcher doesn't make sense in a Web application but is more suitable in desktop or Service applications.

What do you expect to happen? Some file changes and then what? The server tries to send a new ASP file to the browser? No way, it's not going to happen.
The Web is stateless by design. What this means is that there is no continuous connection between a browser and the server. The browser requests a page, at the server that page is loaded / constructed and then sent to the client. This loading will only take a second, or maybe even less. When the page has been sent to the client, the server forgets about the client and will see the same client as an entirely new client when the next page is requested.

So in your scenario, as soon as you hit the button, the FileSystemWatcher will be created (I think; I am not even sure it's possible), the page finishes loading, goes out of scope and all objects created during the page's events will be destroyed.

A Web app is just not the right tool for what you're trying to accomplish. You're trying to saw down a tree with a screw driver ;)


Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #12 (permalink)  
Old March 9th, 2004, 10:57 AM
Registered User
Join Date: Dec 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Great analogy! Thanks for your input. Actually, my final result *was* going to be something that could look at a log file, determine that a change event has occurred, and append the changes that occurred to the file to my output display (basically, the UNIX tail command). Looks like I'll have to bark up another tree with a BIGGER saw...
Thanks again.

Reply With Quote
  #13 (permalink)  
Old June 4th, 2004, 07:29 AM
Registered User
Join Date: Jun 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

There seems to be huge inconsistency when I run a FSW on Windows 2003 Server box, as opposed to a Windows XP box, both of which are monitoring a network share directory. Windows XP box seems to pick up 1000 file change events, whereas, Windows 2003 box seems to pick up only 250 events.

Does anybody know of any network file event conditions on Windows 2003, that could be causing this?

Is it generally a bad idea to watch for file change events over the network?

Any ideas or suggestions will help.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
writing into a file in linux file system anboss XSLT 6 June 19th, 2008 01:56 PM
Help for directory watcher with Windows Service abhisjek-patel VB.NET 0 November 13th, 2007 02:22 AM
Can anybody help me in the system watcher project embursts VB.NET 0 January 29th, 2006 05:15 AM
File watcher with Windows service GregF VB.NET 1 February 1st, 2005 09:39 AM
File System Watcher - Part 2 hugh@kmcnetwork.com VB.NET 1 December 29th, 2003 04:40 PM

All times are GMT -4. The time now is 07:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.