The following is the list of errors returned by WinHTTP.

 

Error NameWin32 Error CodeDescription
ERROR_WINHTTP_OUT_OF_HANDLES0x80072EE1Obsolete; no longer used.
ERROR_WINHTTP_TIMEOUT0x80072EE2The request has timed out. This error can be returned as a result of TCP/IP time-out behavior, regardless of time-out values set in Windows HTTP Services.
ERROR_WINHTTP_INTERNAL_ERROR0x80072EE4An internal error has occurred.
ERROR_WINHTTP_INVALID_URL0x80072EE5The URL is not valid.
ERROR_WINHTTP_UNRECOGNIZED_SCHEME0x80072EE6The URL specified a scheme other than “http:” or “https:”.
ERROR_WINHTTP_NAME_NOT_RESOLVED0x80072EE7The server name cannot be resolved using DNS.
ERROR_WINHTTP_INVALID_OPTION0x80072EE9A request to WinHttpQueryOption or WinHttpSetOption specified an invalid option value.
ERROR_WINHTTP_OPTION_NOT_SETTABLE0x80072EEBThe requested option cannot be set, only queried.
ERROR_WINHTTP_SHUTDOWN0x80072EECThe WinHTTP function support is being shut down or unloaded.
ERROR_WINHTTP_LOGIN_FAILURE0x80072EEFThe login attempt failed.
ERROR_WINHTTP_OPERATION_CANCELLED0x80072EF1The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed.
ERROR_WINHTTP_INCORRECT_HANDLE_TYPE0x80072EF2The type of handle supplied is incorrect for this operation.
ERROR_WINHTTP_INCORRECT_HANDLE_STATE0x80072EF3The requested operation cannot be carried out because the handle supplied is not in the correct state.
ERROR_WINHTTP_CANNOT_CONNECT0x80072EFDConnection to the server failed.
ERROR_WINHTTP_CONNECTION_ERROR0x80072EFEThe connection with the server has been reset or terminated, or an incompatible SSL protocol was encountered.
ERROR_WINHTTP_RESEND_REQUEST0x80072F00The WinHTTP function failed. The desired function can be retried on the same request handle.
ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED0x80072F0CThe server requires SSL client Authentication.
ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN0x80072F44Requested operation cannot be performed before calling the Open method.
ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND0x80072F45Requested operation cannot be performed before calling the Send method.
ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND0x80072F46Requested operation cannot be performed after calling the Send method.
ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN0x80072F47Requested operation cannot be performed after calling the Open method.
ERROR_WINHTTP_HEADER_NOT_FOUND0x80072F76The requested header cannot be located.
ERROR_WINHTTP_INVALID_SERVER_RESPONSE0x80072F78The server response cannot be parsed.
ERROR_WINHTTP_INVALID_HEADER0x80072F79The header cannot be parsed
ERROR_WINHTTP_INVALID_QUERY_REQUEST0x80072F7AObsolete; no longer used.
ERROR_WINHTTP_HEADER_ALREADY_EXISTS0x80072F7BObsolete; no longer used.
ERROR_WINHTTP_REDIRECT_FAILED0x80072F7CThe redirection failed because either the scheme changed or all attempts made to redirect failed (default is five attempts).
ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR0x80072F92A proxy for the specified URL cannot be located.
ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT0x80072F86An error occurred executing the script code in the Proxy Auto-Configuration (PAC) file.
ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT0x80072F87The PAC file cannot be downloaded. For example, the server referenced by the PAC URL may not have been reachable, or the server returned a 404 NOT FOUND response.
ERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE0x80072F90The script type is not supported.
ERROR_WINHTTP_SCRIPT_EXECUTION_ERROR0x80072F91An error was encountered while executing a script.
ERROR_WINHTTP_NOT_INITIALIZED0x80072F8CObsolete; no longer used.
ERROR_WINHTTP_SECURE_FAILURE0x80072F8FOne or more errors were found in the Secure Sockets Layer (SSL) certificate sent by the server. Check CAPI2 Logs
ERROR_WINHTTP_SECURE_CERT_DATE_INVALID0x80072F05Indicates that a required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file, or that the validity periods of the certification chain do not nest correctly
ERROR_WINHTTP_SECURE_CERT_CN_INVALID0x80072F06Certificate common name does not match the passed value.
ERROR_WINHTTP_SECURE_INVALID_CA0x80072F0DRoot certificate is not trusted by the trust provider
ERROR_WINHTTP_SECURE_CERT_REV_FAILED0x80072F19Revocation cannot be checked because the revocation server was offline
ERROR_WINHTTP_SECURE_CHANNEL_ERROR0x80072F7DError occurred with secure channel, check other error code most likely SSL issue
ERROR_WINHTTP_SECURE_INVALID_CERT0x80072F89Certificate is invalid.
ERROR_WINHTTP_SECURE_CERT_REVOKED0x80072F8ACertificate has been revoked
ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE0x80072F93Certificate is not valid for the requested usage. i.e: wrong EKU
ERROR_WINHTTP_AUTODETECTION_FAILED0x80072F94Unable to discover the URL of the Proxy Auto-Configuration (PAC) file.
ERROR_WINHTTP_HEADER_COUNT_EXCEEDED0x80072F95Larger number of headers were present in a response than WinHTTP could receive.
ERROR_WINHTTP_HEADER_SIZE_OVERFLOW0x80072F96Size of headers received exceeds the limit for the request handle.
ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW0x80072F97Overflow condition is encountered in the course of parsing chunked encoding.
ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW0x80072F98Incoming response exceeds an internal WinHTTP size limit.
ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY0x80072F99The SSL client certificate does not have a private key associated with it. The client certificate may have been imported to the computer without the private key.
ERROR_WINHTTP_CLIENT_CERT_NO_ACCESS_PRIVATE_KEY0x80072F9AThe application does not have the required privileges to access the private key associated with the client certificate.
ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED_PROXY0x80072F9BA client certificate is required to authenticate on the proxy
ERROR_WINHTTP_SECURE_FAILURE_PROXY0x80072F9C 
ERROR_WINHTTP_RESERVED_1890x80072F9DNot used
ERROR_WINHTTP_HTTP_PROTOCOL_MISMATCH0x80072F9E