Click here to Skip to main content
11,479,162 members (62,018 online)
   

ASP.NET

 
Answer"Resolution" Pin
Sentenryu7-Nov-12 4:12
memberSentenryu7-Nov-12 4:12 
Questionsign in Popup like codeproject.com Pin
RA|-|UL PATEL6-Nov-12 2:27
memberRA|-|UL PATEL6-Nov-12 2:27 
AnswerRe: sign in Popup like codeproject.com Pin
Matt U.6-Nov-12 3:14
memberMatt U.6-Nov-12 3:14 
QuestionNeed help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 1:39
membersilentspeaker6-Nov-12 1:39 
I am having problem in Uploading 500 MB File on web server
can anyone help me

Private Function UploadToFTP(ByVal fileToUpload As HttpPostedFile) As Boolean
 
Try
Dim uploadUrl As String = "ftp://........................."
Dim uploadFileName As String = fileToUpload.FileName
 
Dim streamObj As Stream = fileToUpload.InputStream
Dim buffer As [Byte]() = New [Byte](fileToUpload.ContentLength - 1) {}
streamObj.Read(buffer, 0, buffer.Length)
streamObj.Close()
streamObj = Nothing
 
Dim ftpUrl As String = String.Format("{0}/{1}", uploadUrl, uploadFileName)
Dim requestObj As FtpWebRequest = TryCast(FtpWebRequest.Create(ftpUrl), FtpWebRequest)
requestObj.Method = WebRequestMethods.Ftp.UploadFile
requestObj.Credentials = New NetworkCredential("UserID", "Password")
Dim requestStream As Stream = requestObj.GetRequestStream()
requestStream.Write(buffer, 0, buffer.Length)
requestStream.Flush()
requestStream.Close()
requestObj = Nothing
 
Return True
Catch ex As Exception
Return False
End Try
End Function

AnswerRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 2:32
memberRichard Deeming6-Nov-12 2:32 
GeneralRe: Need help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 4:31
membersilentspeaker6-Nov-12 4:31 
GeneralRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 5:05
memberRichard Deeming6-Nov-12 5:05 
GeneralRe: Need help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 5:38
membersilentspeaker6-Nov-12 5:38 
GeneralRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 5:59
memberRichard Deeming6-Nov-12 5:59 
GeneralRe: Need help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 6:05
membersilentspeaker6-Nov-12 6:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 22 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid