Alderweireldt Erik
New member
- Joined
- Apr 14, 2010
- Messages
- 1
- Programming Experience
- 3-5
Hi, I wonder if anyone could help me on this?
Following code corrupts zip files, found out to do it with a FILESTREAM in stead of a stream writer bit i can not figure out how to do it.
Dim Request As FtpWebRequest
Dim Response As FtpWebResponse
Dim Writer As StreamWriter
Request = WebRequest.Create("ftp://ftp2.techdata-it-emea.com/fees.zip")
Request.Credentials = New NetworkCredential("login", "password")
Request.Method = WebRequestMethods.Ftp.DownloadFile
Request.UseBinary = True
Response = Request.GetResponse()
Writer = New StreamWriter(Server.MapPath("~/files/feesN.zip"))
Writer.Write(New StreamReader(Response.GetResponseStream()).ReadToEnd)
Writer.Close()
litResponse.Text = Response.StatusDescription
Response.Close()
TNX
Following code corrupts zip files, found out to do it with a FILESTREAM in stead of a stream writer bit i can not figure out how to do it.
Dim Request As FtpWebRequest
Dim Response As FtpWebResponse
Dim Writer As StreamWriter
Request = WebRequest.Create("ftp://ftp2.techdata-it-emea.com/fees.zip")
Request.Credentials = New NetworkCredential("login", "password")
Request.Method = WebRequestMethods.Ftp.DownloadFile
Request.UseBinary = True
Response = Request.GetResponse()
Writer = New StreamWriter(Server.MapPath("~/files/feesN.zip"))
Writer.Write(New StreamReader(Response.GetResponseStream()).ReadToEnd)
Writer.Close()
litResponse.Text = Response.StatusDescription
Response.Close()
TNX