ygef...@gmail.com
unread,Jun 27, 2014, 10:23:53 AM6/27/14You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
I'm programming a web Service in C++ and WinHttp. I'm trying to send text file to a IIS Server. But the http response is 404 NOT Found. Are there a special folder for the text file?
This is my code lines:
hRequest = WinHttpOpenRequest(hConnect, L"POST", L"HelloTest1.txt", NULL, L"D:\\Projet_WebService/WebSerciceClient/WebServiceClient/", WINHTTP_DEFAULT_ACCEPT_TYPES, NULL);
bResults = WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, &in_pwchData, wcslen(in_pwchData)*sizeof(*in_pwchData), wcslen(in_pwchData)*sizeof(*in_pwchData), 0);
or:
hRequest = WinHttpOpenRequest(hConnect, L"POST", L"HelloTest1.txt", NULL, L"D:\\Projet_WebService/WebSerciceClient/WebServiceClient/", WINHTTP_DEFAULT_ACCEPT_TYPES, NULL);
bResults = WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);
bResults = WinHttpWriteData( hRequest, in_pwchData, wcslen(in_pwchData), &dwBytesWritten);
PS: GetLastError(), doesn't return error. I'v got just ERROR from communcation ERROR 404 NOT FOUND. And my server reveives correctly the demand "PUT" "/HelloTest1.txt".
Thnak for your help