Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2006 Mar : Problem with POST'd files to a server via InetSDK
| Subject: | Problem with POST'd files to a server via InetSDK |
| Posted by: | "Reiner Ziegler" (reiner.ziegl..@mail.regio.net) |
| Date: | Thu, 16 Mar 2006 16:52:44 |
Hi there,
I'm currently writing a "little" program for a
customer, which copies one or more files
from a local machine to a machine in the Internet.
The Internet-machine is a W2K3-server with SP 1 and IIS 6.0.
I'm using the WinInet-API from the platform-SDK
(no MFC).
I have created a virtual directory on the server, granting
write-access to the directory for anonymous access and
my account.
Performing a GET on the remote machine results
in no problems.
The problems begin when I try to upload a file via
HTTP-POST.
I'm receiving two distinct errors in two distinct situations:
1.) If the file is always present in the virtual directory
on the server, I'm receiving a HTTP-Error 404
represented as "404 0 2" by IIS-Logfile. The error means
"File not found"! (????!!!! I want to upload the file,
regardless if the file exists or not).
2.) If the file is NOT present on the server, the error-code
is: "405 0 1". HTTP-Error 405 means "HTTP-Verb used to access
this page is not allowed", the corresponding WIN32-Error is 1
(ERROR_NOT_IMPLEMENTED).
3.) Performing a PUT instead of a POST results in a server-error 501.
Now I'm really helpless!!!!
Hope you can help me!
Thank you in advance and best regards
Reiner
PS: I have attached the relevant code as a file-attachment.