I have an ASP.NET 1.1 application that stores documents and files inside SQL Server 2000. I am able to upload and store any type of file in both my developmnt environment (XP Pro SP3) and on my Windows 2003 Server. On my client's site they are able to upload and store all document types except .BMP, .ZIP and .VSD files.
My code (see attached) simply streams the data into a SQL Server column with a data type of Image and does not care what type of file it is.
Can anyone give me ANY reason why certain file types would be excluded? For example, are there any policies at an Operating System level that could be set/unset to overcome this issue? The collation sequence on all instances of SQL Server 2000 is identical across all sites.
.Parameters.Item("@FileContent").Value = GetByteArrayFromFileField(FileUpload)
Private Function GetByteArrayFromFileField(ByVal FileField As System.Web.UI.HtmlControls.HtmlInputFile) As Byte()
' Returns a byte array from the passed
' file field controls file
Dim intFileLength As Integer, bytData() As Byte
Dim objStream As System.IO.Stream
If FileFieldSelected(FileField) Then
intFileLength = FileField.PostedFile.ContentLength
objStream = FileField.PostedFile.InputStream
objStream.Read(bytData, 0, intFileLength)