Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to read beyond the end of the stream
Message
From
06/05/2008 10:56:27
 
 
To
28/04/2008 10:36:29
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01313514
Message ID:
01315349
Views:
17
In regards to this, I only have this is one application and it is one which is reading a file on disk at every hit. I believe this is coming from:
        ' Same as FileToStr() but for binary files
        ' expC1 File name
        Public Function FileToStrBinary(ByVal tcFileName As String) As String
            Dim lcString As String = ""
            Dim lnCounter As Integer = 0
            Dim lnDelay As Integer = 250
            Dim lnRetry As Integer = 8
            Dim loFile As IO.StreamReader
            For lnCounter = 1 To lnRetry
                Try
                    loFile = New IO.StreamReader(tcFileName, System.Text.Encoding.Default)
                    lcString = loFile.ReadToEnd()
                    loFile.Close()
                    Exit For
                Catch loError As Exception

                    ' If we have not reached the maximum tries of 8, we retry
                    If lnCounter < 8 Then

                        ' Wait for a timeout before retrying
                        System.Threading.Thread.Sleep(lnDelay)

                        Continue For
                    End If

                    ' Get the proper definition as per the current scope
                    If oProcess Is Nothing Then
                        oApp.ErrorSetup(loError)
                    Else
                        oProcess.ErrorSetup(loError)
                    End If

                End Try
            Next
            Return lcString
        End Function
Could ReadToEnd() be causing this?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform