Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6787789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:24:29+00:00 2026-05-26T17:24:29+00:00

I have wrote a web service, in a nutshell it uses openpop to get

  • 0

I have wrote a web service, in a nutshell it uses openpop to get email messages does stuff with the content to insert into databases and saves attachments which are images. That works fine when i save images locally, it does exactley what it is suppose to. Now an added requirment was to save images to an FTP directory, so i can create my folders dynamically (they are created based upon timestamp) and that works well. My problem comes from when i try to save them to the ftp. Yes my user name and password are correct, otherwise i wouldn’t be creating the directory.

Private Sub UploadFile(ByVal fileToSave As FileInfo, ByVal path As String)
    Dim UploadRequest As FtpWebRequest = DirectCast(WebRequest.Create("ftp://UserName:Passowrd@999.99.999.9" & path), FtpWebRequest)
    UploadRequest.Credentials = New NetworkCredential("PicService", "grean.matching18")
    UploadRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile
    UploadRequest.UseBinary = True
    UploadRequest.UsePassive = True

    ' Const BufferSize As Integer = 2048
    ' Dim content(BufferSize - 1) As Byte, dataRead As Integer
    Dim bFile() As Byte = System.IO.File.ReadAllBytes(fileToSave.ToString)
    'UploadRequest.ContentLength = content.Length

    Using FileStream1 As FileStream = fileToSave.OpenRead()
        Try
            'open request to send
            Using RequestStream As Stream = UploadRequest.GetRequestStream

            End Using
        Catch ex As Exception
        Finally
            'ensure file closed
            FileStream1.Close()
        End Try
    End Using
End Sub

I have tried using Passive False and Binary False as well, i did more research on my stack trace.
And found this article but no solution as of yet. Any input would be appreciated, i am also posting another question on windows services for different issue. If you would like to take a shot at it, the other question isnt about ftp but permissions for a service on windows server 2003

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:24:29+00:00Added an answer on May 26, 2026 at 5:24 pm

    This may not be the solution but I’ve found that the URI string has to be ‘just right’ and that what is ‘just right’ varies by the ftp server.

    So ftp://server/directory/file works on some servers but needs to be ftp://server//directory/file to work on others (note the double slash after the server name)

    Aso, your URI has ‘password’ spelled incorrectly: ftp://UserName:Passowrd@999.99.999.9 and you are supplying the credentials in a separate code line as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web service that I have published locally. I wrote an HTML
I have wrote a basic web service using .net which I intend to use
I have written an application that queries a web service I wrote (which returns
I have a REST web service class which i call HttpRequest using curl.I wrote
I wrote a web service that respond JSON content lower than 1K. Which one
I have a simple web service I wrote using Webmatrix that returns data in
I have wrote a simple web service in .NET which return a string value.
I have a simple web service sitting on our internal network. I used SOAPUI
I'm trying to write a web service for the java.util.logging api. So I wrote
I have the following code: CustomerService service; public CustomerService Service { get { if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.