I have a webform in asp.net 3.5 and VB and uses RadAjaxManager for updating the
datatable/grid. Also uses impersonate in web.config.
I have a routine that loads a flat file into a datatable and checks
for the existance of a notes file on our fileserver and then updates
a datatable and grid if that file exists. Everything works fine when
the page first loads and my routine (shown below) checks and finds
the existance of the files and updates the datatable/grid correctly.
I also have a timer on the webform that checks the flat file for any
changes. If the flat file is changed then it updates the datatable and
checks for the existance of the notes files again by running the same
routine that it runs when the page first loads. However, this time it
does not find any files. The files are still there and the datatable/grid
gets updated correctly with any changes from the flat file. It is just
that System.IO.FileInfo and Exists always returns false every time
after the first time the routine is run during the page load event.
The note files are still available when the timer executes the routine
using AJAX but returns false. I can do a full refresh of the page and
the note files show up again.
...
Dim notesfile as String notesfile = "\\hs_file\ROOT\SYS\HOME\" & username & "\NOTES\" & MeasureYears & "\" & sMeasureValue & ".doc" Dim filenotes As New System.IO.FileInfo(notesfile) If filenotes.Exists() Then row("NotesFileName") = notesfile row("Notes") = "Your Notes" Else row("Notes") = Nothing row("NotesFileName") = Nothing End If ...
Any help will be greatly appreciated. Thanks.
Jerry