Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

that link was an example of where i'd like to upload it...thats not my actual website!

 

the code i've been trying to make work is:

 

Dim url As String = "http://www.callistocreations.co.uk/licensing/keys/file.txt"
           'Dim file As String = "C:\Users\Nick\Desktop\Callisto Creations\Licensing\Unused Keys\" & keyText.Text & ".txt"

           'My.Computer.Network.UploadFile(file, url)

  • Administrators
Posted

If you try the code you posted above (without the last two lines commented out) what happens?

 

Doe you get any specific errors raised or does it fail in some other way? Do you actually have permissions to upload to the specific area on the destination server? If so you will need to pass the appropriate credentials along with your request.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Try

           My.Computer.Network.UploadFile("C:\Users\Nick\Desktop\Callisto Creations\Licensing\Unused Keys\" & keyText.Text & ".txt", "http://www.callistocreations.co.uk/licensing/keys/test.txt", "username", "password", True, 1000)

       Catch b As Exception

           MessageBox.Show(b.Message)

       End Try

  • Administrators
Posted

It looks as though it is attempting to take the file contents and pass them to the URL you are specifying. You are getting a 404 because it is expecting http://www.callistocreations.co.uk/licensing/keys/test.txt to exist on the server already.

 

Have you tried uploading to a destination URL of http://www.callistocreations.co.uk/licensing/keys to see what happens?

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...