Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

FileSystemWatcher not working in Smart Client

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zoodor - 24 Mar 2006 11:52 GMT
I have created a simple smart client that downloads some xml and puts it into
a document on the client machine. It then launches the default editor for xml
documents (using the Process class and setting the process.StartInfo.Verb =
"Edit"). It then creates a FileSystemWatcher to watch the file and check for
changes (the idea being that it will be able to upload changes back to the
web server). When launched from within Visual Studio 2005, everything works
as expected. However, when launched by downloading the app from a web
browser, the file is created and the default editor launched, but the
FileSystemWatcher does not trigger any events. No errors, no exceptions, it
just doesn't do anything. Are there any known issues with using the
FileSystemWatcher with Smart Clients that might be causing this? Any other
ideas?

The Smart Client has full permission on the client machine, so I don't think
that this can be the problem.
JezB - 27 Mar 2006 16:54 GMT
I have this problem too, but I noticed it only fails the FIRST time I add
files to a folder being watched. Second time, it does fire. Odd. I don't
have a solution though I'm afraid.

>I have created a simple smart client that downloads some xml and puts it
>into
[quoted text clipped - 18 lines]
> think
> that this can be the problem.
Zoodor - 29 Mar 2006 08:41 GMT
Thanks for the reply. I don't even get that functionality; it just refuses to
pick up any new files/changes to existing files when running as a Smart
Client, no matter how many I make :-(

> I have this problem too, but I noticed it only fails the FIRST time I add
> files to a folder being watched. Second time, it does fire. Odd. I don't
[quoted text clipped - 22 lines]
> > think
> > that this can be the problem.
Zoodor - 29 Mar 2006 09:53 GMT
Have finally figured it out.

I was using the FileSystemWatcher to monitor "C:\", but for some reason,
when run as a Smart Client, it thought that "C:\" equated to the directory
that it had been downloaded to and run from. Specifying the directory using
UNC notation (\\<machinename>\c$) meant that it watches the correct directory
both when run directly and as a Smart Client.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.