Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 9th, 2004, 10:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 10:57 AM
Registered User
 
Join Date: Dec 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old June 4th, 2004, 07:29 AM
Registered User
 
Join Date: Jun 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.








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 [email protected] VB.NET 1 December 29th, 2003 04:40 PM





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