uploading a txt file to my server

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:

Code:
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)
 
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.
 
Does the folder you are uploading to exist? Just because you have access to the file system doesn't mean the server is also configured to allow uploads though.

What type of web server is it and how is security configured on the server?
 
Yeah the folder exists.

It's a linux-based shared web server.

Any idea how to check if it allows uploads?

Thanks
 
yes i believe it's apache.

the code works fine, but the try catch always returns a 404 NOT FOUND error. what exactly can it not find...?
 
Code:
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
 
It looks like you will need a page or handler on the server to set as the destination url, this would then receive the uploaded file and would be responsible for saving it out the the actual physical location.
 
Back
Top