Three types of codes may be returned to indicate the status of the operation.
HTTP status codes are as follows. For more information about HTTP Status codes, see http://msdn2.microsoft.com/en-us/library/Aa384325.aspx.
Code |
Description |
100--Continue |
The request can be continued. |
101--Switching Protocols |
The server has switched protocols in an upgrade header. |
200--OK |
The request completed successfully. |
201--Created |
The request has been fulfilled and resulted in the creation of a new resource. |
202--Accepted |
The request has been accepted for processing, but the processing has not been completed. |
203--Non-Authoritative or Partial Information |
The returned meta information in the entity-header is not the definitive set available from the origin server. |
204--No Content |
The server has fulfilled the request, but there is no new information to send back. |
205--Reset Content |
The request has been completed, and the client program should reset the document view that caused the request to be sent to allow the user to easily initiate another input action. |
206--Partial Content |
The server has fulfilled the partial GET request for the resource. |
300--Ambiguous |
The server couldn't decide what to return. |
301--Moved Permanently |
The requested resource has been assigned to a new permanent URI (Uniform Resource Identifier), and any future references to this resource should be done using one of the returned URIs. |
302--Redirect |
The requested resource resides temporarily under a different URI (Uniform Resource Identifier). |
303--Redirect Method |
The response to the request can be found under a different URI (Uniform Resource Identifier) and should be retrieved using a GET HTTP verb on that resource. |
304--Not Modified |
The requested resource has not been modified. |
305--Use Proxy |
The requested resource must be accessed through the proxy given by the location field. |
307--Temporary Redirect |
The redirected request keeps the same HTTP verb. HTTP/1.1 behavior. |
400--Bad Request |
The request could not be processed by the server due to invalid syntax. |
401--Unauthorized |
The requested resource requires user authentication. |
402--Payment Required |
Not currently implemented in the HTTP protocol. |
403--Forbidden |
The server understood the request, but is refusing to fulfill it. |
404--Not Found |
The server has not found anything matching the requested URI. |
405--Bad Method |
The HTTP verb used is not allowed. |
406--Not Acceptable |
No responses acceptable to the client were found. |
407--Authentication Required |
Proxy authentication required. |
408--Request Timeout |
The server timed out waiting for the request. |
409--Conflict |
The request could not be completed due to a conflict with the current state of the resource. The user should resubmit with more information. |
410--Gone |
The requested resource is no longer available at the server, and no forwarding address is known. |
411--Length Required |
The server refuses to accept the request without a defined content length. |
412--Precondition Failed |
The precondition given in one or more of the request header fields evaluated to false when it was tested on the server. |
413--Request too Large |
The server is refusing to process a request because the request entity is larger than the server is willing or able to process. |
414--URI too Long |
The server is refusing to service the request because the request URI (Uniform Resource Identifier) is longer than the server is willing to interpret. |
415--Unsupported Media |
The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method. |
449--Retry with |
The request should be retried after doing the appropriate action. |
500--Server Error |
The server encountered an unexpected condition that prevented it from fulfilling the request. |
501--Not Supported |
The server does not support the functionality required to fulfill the request. |
502--Bad Gateway |
The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. |
503--Service Unavailable |
The service is temporarily overloaded. |
504--Gateway Timeout |
The request was timed out waiting for a gateway. |
505--Version not Supported |
The server does not support, or refuses to support, the HTTP protocol version that was used in the request message. |
WinINet error codes are as follows. For more information about WinINet error codes, see http://msdn2.microsoft.com/en-us/library/Aa233093.aspx.
Code |
Description |
12001 |
ERROR_INTERNET_OUT_OF_HANDLES No more handles could be generated at this time. |
12002 |
ERROR_INTERNET_TIMEOUT The request has timed out. |
12003 |
ERROR_INTERNET_EXTENDED_ERROR An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text. |
12004 |
ERROR_INTERNET_INTERNAL_ERROR An internal error has occurred. |
12005 |
ERROR_INTERNET_INVALID_URL The URL is invalid. |
12006 |
ERROR_INTERNET_UNRECOGNIZED_SCHEME The URL scheme could not be recognized or is not supported. |
12007 |
ERROR_INTERNET_NAME_NOT_RESOLVED The server name could not be resolved. |
12008 |
ERROR_INTERNET_PROTOCOL_NOT_FOUND The requested protocol could not be located. |
12009 |
ERROR_INTERNET_INVALID_OPTION A request to InternetQueryOption or InternetSetOption specified an invalid option value. |
12010 |
ERROR_INTERNET_BAD_OPTION_LENGTH The length of an option supplied to InternetQueryOption or InternetSetOption is incorrect for the type of option specified. |
12011 |
ERROR_INTERNET_OPTION_NOT_SETTABLE The request option cannot be set, only queried. |
12012 |
12012 ERROR_INTERNET_SHUTDOWN The Win32 Internet function support is being shut down or unloaded. |
12013 |
ERROR_INTERNET_INCORRECT_USER_NAME The request to connect and log on to an FTP server could not be completed because the supplied user name is incorrect. |
12014 |
ERROR_INTERNET_INCORRECT_PASSWORD The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect. |
12015 |
ERROR_INTERNET_LOGIN_FAILURE The request to connect to and log on to an FTP server failed. |
12016 |
ERROR_INTERNET_INVALID_OPERATION The requested operation is invalid. |
12017 |
ERROR_INTERNET_OPERATION_CANCELLED The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed. |
12018 |
ERROR_INTERNET_INCORRECT_HANDLE_TYPE The type of handle supplied is incorrect for this operation. |
12019 |
ERROR_INTERNET_INCORRECT_HANDLE_STATE The requested operation cannot be carried out because the handle supplied is not in the correct state. |
12020 |
ERROR_INTERNET_NOT_PROXY_REQUEST The request cannot be made via a proxy. |
12021 |
ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND A required registry value could not be located. |
12022 |
ERROR_INTERNET_BAD_REGISTRY_PARAMETER A required registry value was located but is an incorrect type or has an invalid value. |
12023 |
ERROR_INTERNET_NO_DIRECT_ACCESS Direct network access cannot be made at this time. |
12024 |
ERROR_INTERNET_NO_CONTEXT An asynchronous request could not be made because a zero context value was supplied. |
12025 |
ERROR_INTERNET_NO_CALLBACK An asynchronous request could not be made because a callback function has not been set. |
12026 |
ERROR_INTERNET_REQUEST_PENDING The required operation could not be completed because one or more requests are pending. |
12027 |
ERROR_INTERNET_INCORRECT_FORMAT The format of the request is invalid. |
12028 |
ERROR_INTERNET_ITEM_NOT_FOUND The requested item could not be located. |
12029 |
ERROR_INTERNET_CANNOT_CONNECT The attempt to connect to the server failed. |
12030 |
ERROR_INTERNET_CONNECTION_ABORTED The connection with the server has been terminated. |
12031 |
ERROR_INTERNET_CONNECTION_RESET The connection with the server has been reset. |
12032 |
ERROR_INTERNET_FORCE_RETRY Calls for the Win32 Internet function to redo the request. |
12033 |
ERROR_INTERNET_INVALID_PROXY_REQUEST |
12036 |
ERROR_INTERNET_HANDLE_EXISTS The request failed because the handle already exists. |
12037 |
ERROR_INTERNET_SEC_CERT_DATE_INVALID |
12038 |
ERROR_INTERNET_SEC_CERT_CN_INVALID |
12039 |
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR |
12040 |
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR |
12041 |
ERROR_INTERNET_MIXED_SECURITY Indicates that the content is not entirely secure. Some of the content being viewed may have come from unsecured servers. |
12042 |
ERROR_INTERNET_CHG_POST_IS_NON_SECURE |
12043 |
ERROR_INTERNET_POST_IS_NON_SECURE |
12110 |
ERROR_FTP_TRANSFER_IN_PROGRESS The requested operation cannot be made on the FTP session handle because an operation is already in progress. |
12111 |
ERROR_FTP_DROPPED The FTP operation was not completed because the session was aborted. |
12130 |
ERROR_GOPHER_PROTOCOL_ERROR An error was detected while parsing data returned from the gopher server. |
12131 |
ERROR_GOPHER_NOT_FILE The request must be made for a file locator. |
12132 |
ERROR_GOPHER_DATA_ERROR An error was detected while receiving data from the gopher server. |
12133 |
ERROR_GOPHER_END_OF_DATA The end of the data has been reached. |
12134 |
ERROR_GOPHER_INVALID_LOCATOR The supplied locator is not valid. |
12135 |
ERROR_GOPHER_INCORRECT_LOCATOR_TYPE The type of the locator is not correct for this operation. |
12136 |
ERROR_GOPHER_NOT_GOPHER_PLUS The requested operation can only be made against a Gopher+ server or with a locator that specifies a Gopher+ operation. |
12137 |
ERROR_GOPHER_ATTRIBUTE_NOT_FOUND The requested attribute could not be located. |
12138 |
ERROR_GOPHER_UNKNOWN_LOCATOR The locator type is unknown. |
12150 |
ERROR_HTTP_HEADER_NOT_FOUND The requested header could not be located. |
12151 |
ERROR_HTTP_DOWNLEVEL_SERVER The server did not return any headers. |
12152 |
ERROR_HTTP_INVALID_SERVER_RESPONSE The server response could not be parsed. |
12153 |
ERROR_HTTP_INVALID_HEADER The supplied header is invalid. |
12154 |
ERROR_HTTP_INVALID_QUERY_REQUEST The request made to HttpQueryInfo is invalid. |
12155 |
ERROR_HTTP_HEADER_ALREADY_EXISTS The header could not be added because it already exists. |
12156 |
ERROR_HTTP_REDIRECT_FAILED |
WinHTTP error codes are as follows. For more information about WinHTTP error messages, see http://msdn2.microsoft.com/en-us/library/Aa383770.aspx.
Code |
Description |
---|---|
12044 |
ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED The server requests client authentication. |
12045 |
ERROR_WINHTTP_SECURE_INVALID_CA Indicates that a certificate chain was processed but terminated in a root certificate that is not trusted by the trust provider. |
12057 |
ERROR_WINHTTP_SECURE_CERT_REV_FAILED Indicates that revocation could not be checked because the revocation server was offline. |
12157 |
ERROR_WINHTTP_SECURE_CHANNEL_ERROR Indicates that an error occurred having to do with a secure channel. |
12166 |
ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT An error occurred executing the script code in the Proxy Auto-Configuration (PAC) file. |
12167 |
ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT The PAC file could not 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. |
12169 |
ERROR_WINHTTP_SECURE_INVALID_CERT Indicates that a certificate is invalid. |
12170 |
ERROR_WINHTTP_SECURE_CERT_REVOKED Indicates that a certificate has been revoked. |
12179 |
ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE Indicates that a certificate is not valid for the requested usage. |
12181 |
ERROR_WINHTTP_HEADER_COUNT_EXCEEDED A larger number of headers were present in a response than WinHTTP could receive. |
12182 |
ERROR_WINHTTP_HEADER_SIZE_OVERFLOW The size of headers received exceeds the limit for the request handle. |
12183 |
ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_ OVERFLOW An overflow condition is encountered in the course of parsing chunked encoding. |
12184 |
ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW Returned when an incoming response exceeds an internal WinHTTP size limit. |
12185 |
ERROR_WINHTTP_PROXY_AUTH_REQUIRED Returned on Windows Server 2003 family if an HTTP status code of 407 is returned, which indicates that proxy authentication is required. This error was added to handle the case where the client is trying to establish an SSL connection to a target server via a proxy server, but the proxy server requires authentication. This error is not returned on Windows XP SP1 and Windows 2000 SP3, which leaves the client unaware that the SSL connection failed. In this case, a subsequent call fails with an INCORRECT_HANDLE_STATE error. |
Following are error codes generated by Windows Sockets (WinSock 2), which is used to make the initial connection to the Web server. These errors normally indicate a problem connecting to the Web server. For more information about Windows Sockets error codes, see http://msdn2.microsoft.com/en-us/library/ms740668.aspx.
Code |
Description |
WSAEINTR--10004 |
Interrupted function call. |
WSAEACCES--10013 |
Permission denied. |
WSAEFAULT--10014 |
Bad address. |
WSAEINVAL--10022 |
Invalid argument. |
WSAEMFILE--10024 |
Too many open files. |
WSAEWOULDBLOCK--10035 |
Resource temporarily unavailable. |
WSAEINPROGRESS--10036 |
Operation now in progress. |
WSAEALREADY--10037 |
Operation already in progress. |
WSAENOTSOCK--10038 |
Socket operation on nonsocket. |
WSAEDESTADDRREQ--10039 |
Destination address required. |
WSAEMSGSIZE--10040 |
Message too long. |
WSAEPROTOTYPE--10041 |
Protocol wrong type for socket. |
WSAENOPROTOOPT--10042 |
Bad protocol option. |
WSAEPROTONOSUPPORT--10043 |
Protocol not supported. |
WSAESOCKTNOSUPPORT--10044 |
Socket type not supported. |
WSAEOPNOTSUPP--10045 |
Operation not supported. |
WSAEPFNOSUPPORT--10046 |
Protocol family not supported. |
WSAEAFNOSUPPORT--10047 |
Address family not supported by protocol family. |
WSAEADDRINUSE--10048 |
Address already in use. |
WSAEADDRNOTAVAIL--10049 |
Cannot assign requested address. |
WSAENETDOWN--10050 |
Network is down. |
WSAENETUNREACH--10051 |
Network is unreachable. |
WSAENETRESET--10052 |
Network dropped connection on reset. |
WSAECONNABORTED--10053 |
Software caused connection abort. |
WSAECONNRESET--10054 |
Connection reset by peer. |
WSAENOBUFS--10055 |
No buffer space available. |
WSAEISCONN--10056 |
Socket is already connected. |
WSAENOTCONN--10057 |
Socket is not connected. |
WSAESHUTDOWN--10058 |
Cannot send after socket shutdown. |
WSAETIMEDOUT--10060 |
Connection timed out. |
WSAECONNREFUSED--10061 |
Connection refused. |
WSAEHOSTDOWN--10064 |
Host is down. |
WSAEHOSTUNREACH--10065 |
No route to host. |
WSAEPROCLIM--10067 |
Too many processes. |
WSASYSNOTREADY--10091 |
Network subsystem is unavailable. |
WSAVERNOTSUPPORTED--10092 |
Winsock.dll version out of range. |
WSANOTINITIALISED--10093 |
Successful WSAStartup not yet performed. |
WSAEDISCON--10101 |
Graceful shutdown in progress. |
WSATYPE_NOT_FOUND--10109 |
Class type not found. |
WSAHOST_NOT_FOUND--11001 |
Host not found. |
WSATRY_AGAIN--11002 |
Nonauthoritative host not found. |
WSANO_RECOVERY--11003 |
This is a nonrecoverable error. |
WSANO_DATA--11004 |
Valid name, no data record of requested type. |