Click here to Skip to main content
12,291,499 members (66,533 online)
   

ASP.NET

 
Questionsign in Popup like codeproject.com Pin
RA|-|UL PATEL6-Nov-12 1:27
memberRA|-|UL PATEL6-Nov-12 1:27 
AnswerRe: sign in Popup like codeproject.com Pin
Matt U.6-Nov-12 2:14
memberMatt U.6-Nov-12 2:14 
QuestionNeed help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 0:39
membersilentspeaker6-Nov-12 0:39 
AnswerRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 1:32
memberRichard Deeming6-Nov-12 1:32 
GeneralRe: Need help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 3:31
membersilentspeaker6-Nov-12 3:31 
GeneralRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 4:05
memberRichard Deeming6-Nov-12 4:05 
GeneralRe: Need help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 4:38
membersilentspeaker6-Nov-12 4:38 
GeneralRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 4:59
memberRichard Deeming6-Nov-12 4:59 
Something like this:

Private Function UploadToFTP(ByVal fileToUpload As HttpPostedFile) As Boolean
   Try
      Dim uploadUrl As String = "ftp://........................."
      Dim uploadFileName As String = fileToUpload.FileName
      
      Using streamObj As Stream = fileToUpload.InputStream
         Dim buffer As [Byte]() = New [Byte](fileToUpload.ContentLength - 1) {}
         streamObj.Read(buffer, 0, buffer.Length)
      End Using
      
      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")
      
      Using requestStream As Stream = requestObj.GetRequestStream()
         requestStream.Write(buffer, 0, buffer.Length)
         requestStream.Flush()
      End Using
      
      Using responseObj As FtpWebResponse = TryCast(requestObj.GetResponse(), FtpWebResponse)
         ' TODO: Look at responseObj.StatusCode to see if the upload succeeded
      End Using
      
      Return True
      
   Catch ex As Exception
      Return False
   End Try
End Function



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Need help to upload 500 MB file on FTP Pin
silentspeaker6-Nov-12 5:05
membersilentspeaker6-Nov-12 5:05 
GeneralRe: Need help to upload 500 MB file on FTP Pin
Richard Deeming6-Nov-12 5:16
memberRichard Deeming6-Nov-12 5:16 
AnswerRe: Need help to upload 500 MB file on FTP Pin
jkirkerx7-Nov-12 13:45
memberjkirkerx7-Nov-12 13:45 
AnswerRe: Need help to upload 500 MB file on FTP Pin
xut24477-Nov-12 14:37
memberxut24477-Nov-12 14:37 
QuestionHow to Get Local Area IP Address? Pin
Nandan Basak5-Nov-12 22:15
memberNandan Basak5-Nov-12 22:15 
AnswerRe: How to Get Local Area IP Address? Pin
Bernhard Hiller6-Nov-12 21:11
memberBernhard Hiller6-Nov-12 21:11 
GeneralRe: How to Get Local Area IP Address? Pin
Nandan Basak4-Dec-12 19:08
memberNandan Basak4-Dec-12 19:08 
AnswerRe: How to Get Local Area IP Address? Pin
rameshkashanna7-Nov-12 2:05
memberrameshkashanna7-Nov-12 2:05 
GeneralRe: How to Get Local Area IP Address? Pin
Nandan Basak4-Feb-13 2:05
memberNandan Basak4-Feb-13 2:05 
QuestionAn error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pin
RKSPradeep4-Nov-12 20:11
memberRKSPradeep4-Nov-12 20:11 
JokeRe: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pin
n.podbielski4-Nov-12 20:52
membern.podbielski4-Nov-12 20:52 
AnswerRe: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pin
ryanb315-Nov-12 5:37
memberryanb315-Nov-12 5:37 
Questionvariable for aspx and all its ascx Pin
jrahma4-Nov-12 8:25
memberjrahma4-Nov-12 8:25 
AnswerRe: variable for aspx and all its ascx Pin
n.podbielski4-Nov-12 10:17
membern.podbielski4-Nov-12 10:17 
GeneralRe: variable for aspx and all its ascx Pin
Amir Jalilifard5-Nov-12 8:15
memberAmir Jalilifard5-Nov-12 8:15 
Questionhttpmodule, context.items.add("originalUrl") Pin
jkirkerx3-Nov-12 19:44
memberjkirkerx3-Nov-12 19:44 
Questionhow to split a page using frameset Pin
fahad.11-Nov-12 2:02
memberfahad.11-Nov-12 2:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web02 | 2.8.160518.1 | Last Updated 24 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid