We have a page which is getting the results of a file system folder/file scan that will occasionally throw an ":out of memory" pop-up to the user (and the list of folders which is within a RadListBox, will actually flow over the box boundaries and down off the bottom of the page); close the browser, re-launch and log in and hit the same page again and it will work just fine.
Below is the sub that scans the file system & loads the list - it seems to all work ok every time - it is the rendering that seems to be taking the hit.
My dev team is not able to identify any specific causes for this - was wondering if anyone has seen this or has any suggestions for debugging or correction.
Below is the sub that scans the file system & loads the list - it seems to all work ok every time - it is the rendering that seems to be taking the hit.
My dev team is not able to identify any specific causes for this - was wondering if anyone has seen this or has any suggestions for debugging or correction.
Private Sub LoadItems(Optional ByVal bolClearText As Boolean = True) |
If bolClearText Then |
lblFinished.Text = "" |
End If |
If txtIngestServerPath.Text.Trim = "" Then Exit Sub |
Dim dir As IO.DirectoryInfo |
Try |
dir = New IO.DirectoryInfo(txtIngestServerPath.Text.Trim) |
Catch |
lstTemplateFiles.Items.Clear() |
lstRadTemplateFiles.Items.Clear() |
Dim intLanguageCode As Integer = SystemLanguages.SystemLanguages.GetInstance().LanguageCodeForID(userinfo.DefaultLanguage) |
lblFinished.Text = Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("Invalidfolderpath", intLanguageCode) |
Exit Sub |
End Try |
lstTemplateFiles.Items.Clear() |
lstRadTemplateFiles.Items.Clear() |
If dir.Exists Then |
If Not dir.Parent Is Nothing Then |
Dim item As New RadListBoxItem |
item.Text = "..." |
item.Value = "" |
item.Attributes("itemtype") = "0" |
item.ImageUrl = Resources.ImagePaths.ParentDirectoryIcon |
lstRadTemplateFiles.Items.Add(item) |
End If |
'If Recurse.Checked() Then |
'ParseDirectory(dir) |
'Else |
Dim folders As System.IO.DirectoryInfo = New System.IO.DirectoryInfo(txtIngestServerPath.Text.Trim) |
For Each Folder As System.IO.DirectoryInfo In folders.GetDirectories |
Dim item As New RadListBoxItem |
'item.Text = Folder.FullName.Replace(txtIngestServerPath.Text.Trim, "") |
item.Text = Folder.Name |
item.Value = Folder.FullName |
item.ImageUrl = Resources.ImagePaths.FolderIcon |
item.Attributes("itemtype") = "1" |
lstRadTemplateFiles.Items.Add(item) |
Next |
Dim files As IO.FileInfo() = dir.GetFiles("*.sca") |
Dim fileName As IO.FileInfo |
For Each fileName In files |
'Dim li As New ListItem |
'li.Text = fileName.FullName.Replace(txtIngestServerPath.Text.Trim, "") |
'li.Value = fileName.FullName |
'lstTemplateFiles.Items.Add(li) |
Dim item As New RadListBoxItem |
'item.Text = fileName.FullName.Replace(txtIngestServerPath.Text.Trim, "") |
item.Text = fileName.Name |
item.Value = fileName.FullName |
item.ImageUrl = Resources.ImagePaths.TemplateIcon |
item.Attributes("itemtype") = "2" |
lstRadTemplateFiles.Items.Add(item) |
Next |
'End If |
objContentPage.AjaxManager.ResponseScripts.Add("ScrollToTop();") |
Else |
Dim intLanguageCode As Integer = SystemLanguages.SystemLanguages.GetInstance().LanguageCodeForID(userinfo.DefaultLanguage) |
lblFinished.Text = Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("Notemplatefilesexistsinselectedfolder", intLanguageCode) |
End If |
End Sub |