Hy all, I am newbie on this forum and I am italian. First of all I'm sorry for language mistakes; also, reading replies should be after a lot of hours due to different country time.
Configuration: VB .NET 2008 PRO and VB .NET 2008 EXpress
My 2 desktop PC: 1 is WinXP SP3 and 1 is Win7 SP1
Server: Windows 2008 R2 Enterprise
.NET framework: 3.5 SP1
I have developed a WinForms application that runs on server 2008; in the app I use the File System Watcher (FSW) component to receive notification on file deletion for a folder that is on connected PC. Connection is by Remote Desktop (RDP). When users, using the app, deletes a file on this folder (and the app do this work and file on PC is really deleted) I need FSW notify the event. I don't have any error in code, simply FSW doesn't fire the event and so I don't receive any notification from PC. Code for FSW (pasted below) isn't executed. lvwDocFiles is a ListView.
Private Sub fswFiles_Deleted(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles fswFiles.Deleted
Try
lvwDocFiles.Items.RemoveByKey(e.FullPath)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
FSW is started and runs when users make deletion. Above code runs when users delete a file on local folder (folder on server) so in this case FSW correctly raise the event.
I have seen already the following post (asked 6 years ago):
FileSystemWatcher Fails to access network drive
but is in C# and is different from my situation.
In my mind I think for possible reasons of this:
- On PC a specific service must be running? For example I tried to starts Alert service but nothing change
- Permissions? But the file has been deleted (the DEL command starts from application on server and correctly arrives on PC)
- Notification starts from PC but do not pass through the RDP connection?
- Notification does not start on PC? I don't know how to investigate on this and previous point (I need a specific program to do this?)
Any suggestions will be highly appreciated.
Thanks to all
Stefano