Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: 404 "Object not found" when doing put
whiprush

From: Springfield, MO USA
Posts: 9
Member Since: 05/13/03
posted May 13, 2003 2:41 PM

I'm trying to use a PUT to send a file to our company's server, but every time I try, I get a 404 (Object not found) error every time. I'm using the MultiPartPost VB6 project, but modifying the DoPost to do a put, as such:

  reqHeaders.Add "Authorization: Basic (encoded user id/password)" & vbCrLf
  
  Http1.Url = "http://website/getfile.txt"
  Http1.GetEx reqHeaders, "C:\getfile.txt"
  'Set Url
  Http1.Url = "http://website/sendfile.txt"
 
  Http1.Put ""
  Http1.Put "C:\sendfile.txt", reqHeaders, result, respHeaders

The get works every time, but I always get the 404 when doing the put. We've turned off SSL on our test site, to try using basic authentication.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted May 14, 2003 10:45 AM

Hi,
Some possibilities include:
The server may not support PUT.
You may not have permission to PUT files.

Does the server provide any clues in the response headers?

What is the purpose of the first Put call in your code?

Thanks,
-ken
whiprush

From: Springfield, MO USA
Posts: 9
Member Since: 05/13/03
posted May 14, 2003 10:58 AM

The first put just has a blank string for content (tried this since it was indicated to be a possible fix in a previous topic. It hasn't helped, though.), and the second is actually trying to send the file to the server.

This is the contents of the response header:

HTTP/1.1 404 Object Not Found
Server: Microsoft-IIS/5.0
Date: Wed, 14 May 2003 14:52:23 GMT
Connection: close
Content-Length: 4040
Content-Type: text/html
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted May 15, 2003 10:50 AM

Hi,
It really sounds like the server does not support Put. Or it does not allow files to be uploaded to that particular location.

But if this was true, then the server should either give a 405 (Method not allowed) or 403 (Forbidden) reponse. 404 indicates the file is not present, which does not make sense, as you are trying to upload it.

When I try Putting a file on an IIS5 server (in a directory with websharing), it works fine. I would try contacting the admin of the server to see if he has any suggestions or insight.
-ken
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX