M
MU
Hello
I have this code and it downloads JPEGS from an FTP site that I am
using. However, when I try to use ASPJPEG or another JPEG component,
it gives me an error saying that the file is corrupt. How do I save
the file as a JPEG?
ASPJPEG Error:
Persits.Jpeg.1 error '80040035'
Not a JPEG file: starts with 0xef 0xbf
ASPThumb Error:
briz.AspThumb error '8000ffff'
Bitmap image is not valid
Here is the code:
myFtpWebRequest = WebRequest.Create("ftp://
ftp.server.com/" & strFileName)
myFtpWebRequest.Credentials = New NetworkCredential
("username", "password")
myFtpWebRequest.Method =
WebRequestMethods.Ftp.DownloadFile
myFtpWebRequest.UseBinary = True
myFtpWebResponse = myFtpWebRequest.GetResponse()
myStreamWriter = New StreamWriter(Server.MapPath("../
images/" & strFileName))
myStreamWriter.Write(New StreamReader
(myFtpWebResponse.GetResponseStream()).ReadToEnd)
myStreamWriter.Close()
myFtpWebResponse.Close()
Thoughts?
I have this code and it downloads JPEGS from an FTP site that I am
using. However, when I try to use ASPJPEG or another JPEG component,
it gives me an error saying that the file is corrupt. How do I save
the file as a JPEG?
ASPJPEG Error:
Persits.Jpeg.1 error '80040035'
Not a JPEG file: starts with 0xef 0xbf
ASPThumb Error:
briz.AspThumb error '8000ffff'
Bitmap image is not valid
Here is the code:
myFtpWebRequest = WebRequest.Create("ftp://
ftp.server.com/" & strFileName)
myFtpWebRequest.Credentials = New NetworkCredential
("username", "password")
myFtpWebRequest.Method =
WebRequestMethods.Ftp.DownloadFile
myFtpWebRequest.UseBinary = True
myFtpWebResponse = myFtpWebRequest.GetResponse()
myStreamWriter = New StreamWriter(Server.MapPath("../
images/" & strFileName))
myStreamWriter.Write(New StreamReader
(myFtpWebResponse.GetResponseStream()).ReadToEnd)
myStreamWriter.Close()
myFtpWebResponse.Close()
Thoughts?