View Complete Post
I have some code to stream files (for security of the files), the code works for all files in IE, and small files in firefox. but If the file is large (eg 750Mb) firefox hangs before it shows the open/save dialog box.
However if i take out response.clearheaders and the response.flush in the code it does download but all the files downloaded by firefox are corrupt because the file size is too large. Filenames are guids but I took the "-" out incase that was an issue.
If any one can shed some light on this I would be very grateful.
Function is Below.
Private Sub StreamFile(ByRef response As HttpResponse, ByVal sFile As String)
Dim fs As FileStream = Nothing
Dim sFileName As String = Path.GetFileName(sFile)
Dim oFile As New FileInfo(sFile)
fs = New FileStream(sFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
Catch ex As Exception
'response.ClearHeaders() 'makes file size wrong in firefox
'To forcefully download, even for Excel, PDF files, reg
I recently notice that on our MVC 2.0 web app that does images retrieval, we have this error when the user close the browser before image file is done transmitting :
TypeAssembly: System.Web, Version=18.104.22.168,
Message: The remote host closed the connection. The error
code is 0x80070057.
TargetSite: Void RaiseCommunicationError(Int32, Boolean)
controllerContext, ActionResult actionResult)
I have dropped and re-created a table that contains filestream columns. When I have done this I see that the original folders / files still exist out on the file system. How is it that these will get removed since the orignal table(s) have been
dropped and re-created?
Looks like the folders are always two levels deep. What does each represent? I can see the actual files, but what do the parent / child folders represent?
I also see the F$log folder.
Im trying to create an XMl File or stream from a SharePoint BDC which displays the data as a list.
Theres the option to use owssvr.dll to get what im after from a standard list with just het site name and GUID
Is there a way to use this with the BDC web part? THe BDC creates what it calls a list and looks the same as a normal SharePoint List, but it grabs the data on page load and does not have a GUID for the list not what i could spot anyway
I have been trying without any success to get a PDF file to stream into a page.
The PDF file is generated / hosted on another domain (our own same server but 3rd party software)
I've trawled the Net and tried to use / adapt some examples but I get nothing at all in the page.
Ideally if I could also wrap it up in a user control that returns the PDF that would make life easier.
Anyone know of any good reliable code (VB preferably) that would help with this.