---
title: Error Messages (Wininet.h)
description: The WinINet functions return error codes where appropriate. The following errors are specific to the WinINet functions.
ms.assetid: 338bf65f-ebe5-4434-8407-9ab2a4c8d381
topic_type:
- apiref
api_name:
- ERROR_FTP_DROPPED
- ERROR_FTP_NO_PASSIVE_MODE
- ERROR_FTP_TRANSFER_IN_PROGRESS
- ERROR_GOPHER_ATTRIBUTE_NOT_FOUND
- ERROR_GOPHER_DATA_ERROR
- ERROR_GOPHER_END_OF_DATA
- ERROR_GOPHER_INCORRECT_LOCATOR_TYPE
- ERROR_GOPHER_INVALID_LOCATOR
- ERROR_GOPHER_NOT_FILE
- ERROR_GOPHER_NOT_GOPHER_PLUS
- ERROR_GOPHER_PROTOCOL_ERROR
- ERROR_GOPHER_UNKNOWN_LOCATOR
- ERROR_HTTP_COOKIE_DECLINED
- ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
- ERROR_HTTP_DOWNLEVEL_SERVER
- ERROR_HTTP_HEADER_ALREADY_EXISTS
- ERROR_HTTP_HEADER_NOT_FOUND
- ERROR_HTTP_INVALID_HEADER
- ERROR_HTTP_INVALID_QUERY_REQUEST
- ERROR_HTTP_INVALID_SERVER_RESPONSE
- ERROR_HTTP_NOT_REDIRECTED
- ERROR_HTTP_REDIRECT_FAILED
- ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION
- ERROR_INTERNET_ASYNC_THREAD_FAILED
- ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT
- ERROR_INTERNET_BAD_OPTION_LENGTH
- ERROR_INTERNET_BAD_REGISTRY_PARAMETER
- ERROR_INTERNET_CANNOT_CONNECT
- ERROR_INTERNET_CHG_POST_IS_NON_SECURE
- ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED
- ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP
- ERROR_INTERNET_CONNECTION_ABORTED
- ERROR_INTERNET_CONNECTION_RESET
- ERROR_INTERNET_DECODING_FAILED
- ERROR_INTERNET_DIALOG_PENDING
- ERROR_INTERNET_DISCONNECTED
- ERROR_INTERNET_EXTENDED_ERROR
- ERROR_INTERNET_FAILED_DUETOSECURITYCHECK
- ERROR_INTERNET_FORCE_RETRY
- ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED
- ERROR_INTERNET_HANDLE_EXISTS
- ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
- ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR
- ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
- ERROR_INTERNET_INCORRECT_FORMAT
- ERROR_INTERNET_INCORRECT_HANDLE_STATE
- ERROR_INTERNET_INCORRECT_HANDLE_TYPE
- ERROR_INTERNET_INCORRECT_PASSWORD
- ERROR_INTERNET_INCORRECT_USER_NAME
- ERROR_INTERNET_INSERT_CDROM
- ERROR_INTERNET_INTERNAL_ERROR
- ERROR_INTERNET_INVALID_CA
- ERROR_INTERNET_INVALID_OPERATION
- ERROR_INTERNET_INVALID_OPTION
- ERROR_INTERNET_INVALID_PROXY_REQUEST
- ERROR_INTERNET_INVALID_URL
- ERROR_INTERNET_ITEM_NOT_FOUND
- ERROR_INTERNET_LOGIN_FAILURE
- ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY
- ERROR_INTERNET_MIXED_SECURITY
- ERROR_INTERNET_NAME_NOT_RESOLVED
- ERROR_INTERNET_NEED_MSN_SSPI_PKG
- ERROR_INTERNET_NEED_UI
- ERROR_INTERNET_NO_CALLBACK
- ERROR_INTERNET_NO_CONTEXT
- ERROR_INTERNET_NO_DIRECT_ACCESS
- ERROR_INTERNET_NOT_INITIALIZED
- ERROR_INTERNET_NOT_PROXY_REQUEST
- ERROR_INTERNET_OPERATION_CANCELLED
- ERROR_INTERNET_OPTION_NOT_SETTABLE
- ERROR_INTERNET_OUT_OF_HANDLES
- ERROR_INTERNET_POST_IS_NON_SECURE
- ERROR_INTERNET_PROTOCOL_NOT_FOUND
- ERROR_INTERNET_PROXY_SERVER_UNREACHABLE
- ERROR_INTERNET_REDIRECT_SCHEME_CHANGE
- ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND
- ERROR_INTERNET_REQUEST_PENDING
- ERROR_INTERNET_RETRY_DIALOG
- ERROR_INTERNET_SEC_CERT_CN_INVALID
- ERROR_INTERNET_SEC_CERT_DATE_INVALID
- ERROR_INTERNET_SEC_CERT_ERRORS
- ERROR_INTERNET_SEC_CERT_NO_REV
- ERROR_INTERNET_SEC_CERT_REV_FAILED
- ERROR_INTERNET_SEC_CERT_REVOKED
- ERROR_INTERNET_SEC_INVALID_CERT
- ERROR_INTERNET_SECURITY_CHANNEL_ERROR
- ERROR_INTERNET_SERVER_UNREACHABLE
- ERROR_INTERNET_SHUTDOWN
- ERROR_INTERNET_TCPIP_NOT_INSTALLED
- ERROR_INTERNET_TIMEOUT
- ERROR_INTERNET_UNABLE_TO_CACHE_FILE
- ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT
- ERROR_INTERNET_UNRECOGNIZED_SCHEME
- ERROR_INVALID_HANDLE
- ERROR_MORE_DATA
- ERROR_NO_MORE_FILES
- ERROR_NO_MORE_ITEMS
api_location:
- Wininet.h
api_type:
- HeaderDef
ms.topic: reference
ms.date: 05/31/2018
---
# Error Messages (Wininet.h)
The WinINet functions return error codes where appropriate. The following errors are specific to the WinINet functions.
-
**ERROR\_FTP\_DROPPED**
-
-
12111
-
The FTP operation was not completed because the session was aborted.
-
**ERROR\_FTP\_NO\_PASSIVE\_MODE**
-
-
12112
-
Passive mode is not available on the server.
-
**ERROR\_FTP\_TRANSFER\_IN\_PROGRESS**
-
-
12110
-
The requested operation cannot be made on the FTP session handle because an operation is already in progress.
-
**ERROR\_GOPHER\_ATTRIBUTE\_NOT\_FOUND**
-
-
12137
-
The requested attribute could not be located.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_DATA\_ERROR**
-
-
12132
-
An error was detected while receiving data from the Gopher server.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_END\_OF\_DATA**
-
-
12133
-
The end of the data has been reached.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_INCORRECT\_LOCATOR\_TYPE**
-
-
12135
-
The type of the locator is not correct for this operation.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_INVALID\_LOCATOR**
-
-
12134
-
The supplied locator is not valid.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_NOT\_FILE**
-
-
12131
-
The request must be made for a file locator.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_NOT\_GOPHER\_PLUS**
-
-
12136
-
The requested operation can be made only against a Gopher+ server, or with a locator that specifies a Gopher+ operation.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_PROTOCOL\_ERROR**
-
-
12130
-
An error was detected while parsing data returned from the Gopher server.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_GOPHER\_UNKNOWN\_LOCATOR**
-
-
12138
-
The locator type is unknown.
> [!Note]
> Windows XP and Windows Server 2003 R2 and earlier only.
-
**ERROR\_HTTP\_COOKIE\_DECLINED**
-
-
12162
-
The HTTP cookie was declined by the server.
-
**ERROR\_HTTP\_COOKIE\_NEEDS\_CONFIRMATION**
-
-
12161
-
The HTTP cookie requires confirmation.
> [!Note]
> Windows Vista and Windows Server 2008 and earlier only.
-
**ERROR\_HTTP\_DOWNLEVEL\_SERVER**
-
-
12151
-
The server did not return any headers.
-
**ERROR\_HTTP\_HEADER\_ALREADY\_EXISTS**
-
-
12155
-
The header could not be added because it already exists.
-
**ERROR\_HTTP\_HEADER\_NOT\_FOUND**
-
-
12150
-
The requested header could not be located.
-
**ERROR\_HTTP\_INVALID\_HEADER**
-
-
12153
-
The supplied header is invalid.
-
**ERROR\_HTTP\_INVALID\_QUERY\_REQUEST**
-
-
12154
-
The request made to [**HttpQueryInfo**](/windows/desktop/api/Wininet/nf-wininet-httpqueryinfoa) is invalid.
-
**ERROR\_HTTP\_INVALID\_SERVER\_RESPONSE**
-
-
12152
-
The server response could not be parsed.
-
**ERROR\_HTTP\_NOT\_REDIRECTED**
-
-
12160
-
The HTTP request was not redirected.
-
**ERROR\_HTTP\_REDIRECT\_FAILED**
-
-
12156
-
The redirection failed because either the scheme changed (for example, HTTP to FTP) or all attempts made to redirect failed (default is five attempts).
-
**ERROR\_HTTP\_REDIRECT\_NEEDS\_CONFIRMATION**
-
-
12168
-
The redirection requires user confirmation.
-
**ERROR\_INTERNET\_ASYNC\_THREAD\_FAILED**
-
-
12047
-
The application could not start an asynchronous thread.
-
**ERROR\_INTERNET\_BAD\_AUTO\_PROXY\_SCRIPT**
-
-
12166
-
There was an error in the automatic proxy configuration script.
-
**ERROR\_INTERNET\_BAD\_OPTION\_LENGTH**
-
-
12010
-
The length of an option supplied to [**InternetQueryOption**](/windows/desktop/api/Wininet/nf-wininet-internetqueryoptiona) or [**InternetSetOption**](/windows/desktop/api/Wininet/nf-wininet-internetsetoptiona) is incorrect for the type of option specified.
-
**ERROR\_INTERNET\_BAD\_REGISTRY\_PARAMETER**
-
-
12022
-
A required registry value was located but is an incorrect type or has an invalid value.
-
**ERROR\_INTERNET\_CANNOT\_CONNECT**
-
-
12029
-
The attempt to connect to the server failed.
-
**ERROR\_INTERNET\_CHG\_POST\_IS\_NON\_SECURE**
-
-
12042
-
The application is posting and attempting to change multiple lines of text on a server that is not secure.
-
**ERROR\_INTERNET\_CLIENT\_AUTH\_CERT\_NEEDED**
-
-
12044
-
The server is requesting client authentication.
-
**ERROR\_INTERNET\_CLIENT\_AUTH\_NOT\_SETUP**
-
-
12046
-
Client authorization is not set up on this computer.
-
**ERROR\_INTERNET\_CONNECTION\_ABORTED**
-
-
12030
-
The connection with the server has been terminated.
-
**ERROR\_INTERNET\_CONNECTION\_RESET**
-
-
12031
-
The connection with the server has been reset.
-
**ERROR\_INTERNET\_DECODING\_FAILED**
-
-
12175
-
WinINet failed to perform content decoding on the response. For more information, see the [**Content Encoding**](content-encoding.md) topic.
-
**ERROR\_INTERNET\_DIALOG\_PENDING**
-
-
12049
-
Another thread has a password dialog box in progress.
-
**ERROR\_INTERNET\_DISCONNECTED**
-
-
12163
-
The Internet connection has been lost.
-
**ERROR\_INTERNET\_EXTENDED\_ERROR**
-
-
12003
-
An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call [**InternetGetLastResponseInfo**](/windows/desktop/api/Wininet/nf-wininet-internetgetlastresponseinfoa) to retrieve the error text.
-
**ERROR\_INTERNET\_FAILED\_DUETOSECURITYCHECK**
-
-
12171
-
The function failed due to a security check.
-
**ERROR\_INTERNET\_FORCE\_RETRY**
-
-
12032
-
The function needs to redo the request.
-
**ERROR\_INTERNET\_FORTEZZA\_LOGIN\_NEEDED**
-
-
12054
-
The requested resource requires Fortezza authentication.
-
**ERROR\_INTERNET\_HANDLE\_EXISTS**
-
-
12036
-
The request failed because the handle already exists.
-
**ERROR\_INTERNET\_HTTP\_TO\_HTTPS\_ON\_REDIR**
-
-
12039
-
The application is moving from a non-SSL to an SSL connection because of a redirect.
-
**ERROR\_INTERNET\_HTTPS\_HTTP\_SUBMIT\_REDIR**
-
-
12052
-
The data being submitted to an SSL connection is being redirected to a non-SSL connection.
-
**ERROR\_INTERNET\_HTTPS\_TO\_HTTP\_ON\_REDIR**
-
-
12040
-
The application is moving from an SSL to an non-SSL connection because of a redirect.
-
**ERROR\_INTERNET\_INCORRECT\_FORMAT**
-
-
12027
-
The format of the request is invalid.
-
**ERROR\_INTERNET\_INCORRECT\_HANDLE\_STATE**
-
-
12019
-
The requested operation cannot be carried out because the handle supplied is not in the correct state.
-
**ERROR\_INTERNET\_INCORRECT\_HANDLE\_TYPE**
-
-
12018
-
The type of handle supplied is incorrect for this operation.
-
**ERROR\_INTERNET\_INCORRECT\_PASSWORD**
-
-
12014
-
The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect.
-
**ERROR\_INTERNET\_INCORRECT\_USER\_NAME**
-
-
12013
-
The request to connect and log on to an FTP server could not be completed because the supplied user name is incorrect.
-
**ERROR\_INTERNET\_INSERT\_CDROM**
-
-
12053
-
The request requires a CD-ROM to be inserted in the CD-ROM drive to locate the resource requested.
> [!Note]
> Windows Vista and Windows Server 2008 and earlier only.
-
**ERROR\_INTERNET\_INTERNAL\_ERROR**
-
-
12004
-
An internal error has occurred.
-
**ERROR\_INTERNET\_INVALID\_CA**
-
-
12045
-
The function is unfamiliar with the Certificate Authority that generated the server's certificate.
-
**ERROR\_INTERNET\_INVALID\_OPERATION**
-
-
12016
-
The requested operation is invalid.
-
**ERROR\_INTERNET\_INVALID\_OPTION**
-
-
12009
-
A request to [**InternetQueryOption**](/windows/desktop/api/Wininet/nf-wininet-internetqueryoptiona) or [**InternetSetOption**](/windows/desktop/api/Wininet/nf-wininet-internetsetoptiona) specified an invalid option value.
-
**ERROR\_INTERNET\_INVALID\_PROXY\_REQUEST**
-
-
12033
-
The request to the proxy was invalid.
-
**ERROR\_INTERNET\_INVALID\_URL**
-
-
12005
-
The URL is invalid.
-
**ERROR\_INTERNET\_ITEM\_NOT\_FOUND**
-
-
12028
-
The requested item could not be located.
-
**ERROR\_INTERNET\_LOGIN\_FAILURE**
-
-
12015
-
The request to connect and log on to an FTP server failed.
-
**ERROR\_INTERNET\_LOGIN\_FAILURE\_DISPLAY\_ENTITY\_BODY**
-
-
12174
-
The MS-Logoff digest header has been returned from the website. This header specifically instructs the digest package to purge credentials for the associated realm. This error will only be returned if [INTERNET\_ERROR\_MASK\_LOGIN\_FAILURE\_DISPLAY\_ENTITY\_BODY](option-flags.md) option has been set; otherwise, **ERROR\_INTERNET\_LOGIN\_FAILURE** is returned.
-
**ERROR\_INTERNET\_MIXED\_SECURITY**
-
-
12041
-
The content is not entirely secure. Some of the content being viewed may have come from unsecured servers.
-
**ERROR\_INTERNET\_NAME\_NOT\_RESOLVED**
-
-
12007
-
The server name could not be resolved.
-
**ERROR\_INTERNET\_NEED\_MSN\_SSPI\_PKG**
-
-
12173
-
Not currently implemented.
-
**ERROR\_INTERNET\_NEED\_UI**
-
-
12034
-
A user interface or other blocking operation has been requested.
> [!Note]
> Windows Vista and Windows Server 2008 and earlier only.
-
**ERROR\_INTERNET\_NO\_CALLBACK**
-
-
12025
-
An asynchronous request could not be made because a callback function has not been set.
-
**ERROR\_INTERNET\_NO\_CONTEXT**
-
-
12024
-
An asynchronous request could not be made because a zero context value was supplied.
-
**ERROR\_INTERNET\_NO\_DIRECT\_ACCESS**
-
-
12023
-
Direct network access cannot be made at this time.
-
**ERROR\_INTERNET\_NOT\_INITIALIZED**
-
-
12172
-
Initialization of the WinINet API has not occurred. Indicates that a higher-level function, such as [**InternetOpen**](/windows/desktop/api/Wininet/nf-wininet-internetopena), has not been called yet.
-
**ERROR\_INTERNET\_NOT\_PROXY\_REQUEST**
-
-
12020
-
The request cannot be made via a proxy.
-
**ERROR\_INTERNET\_OPERATION\_CANCELLED**
-
-
12017
-
The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed.
-
**ERROR\_INTERNET\_OPTION\_NOT\_SETTABLE**
-
-
12011
-
The requested option cannot be set, only queried.
-
**ERROR\_INTERNET\_OUT\_OF\_HANDLES**
-
-
12001
-
No more handles could be generated at this time.
-
**ERROR\_INTERNET\_POST\_IS\_NON\_SECURE**
-
-
12043
-
The application is posting data to a server that is not secure.
-
**ERROR\_INTERNET\_PROTOCOL\_NOT\_FOUND**
-
-
12008
-
The requested protocol could not be located.
-
**ERROR\_INTERNET\_PROXY\_SERVER\_UNREACHABLE**
-
-
12165
-
The designated proxy server cannot be reached.
-
**ERROR\_INTERNET\_REDIRECT\_SCHEME\_CHANGE**
-
-
12048
-
The function could not handle the redirection, because the scheme changed (for example, HTTP to FTP).
-
**ERROR\_INTERNET\_REGISTRY\_VALUE\_NOT\_FOUND**
-
-
12021
-
A required registry value could not be located.
-
**ERROR\_INTERNET\_REQUEST\_PENDING**
-
-
12026
-
The required operation could not be completed because one or more requests are pending.
-
**ERROR\_INTERNET\_RETRY\_DIALOG**
-
-
12050
-
The dialog box should be retried.
-
**ERROR\_INTERNET\_SEC\_CERT\_CN\_INVALID**
-
-
12038
-
SSL certificate common name (host name field) is incorrect for example, if you entered `www.server.com` and the common name on the certificate says `www.different.com`.
-
**ERROR\_INTERNET\_SEC\_CERT\_DATE\_INVALID**
-
-
12037
-
SSL certificate date that was received from the server is bad. The certificate is expired.
-
**ERROR\_INTERNET\_SEC\_CERT\_ERRORS**
-
-
12055
-
The SSL certificate contains errors.
-
**ERROR\_INTERNET\_SEC\_CERT\_NO\_REV**
-
-
12056
-
The SSL certificate was not revoked.
-
**ERROR\_INTERNET\_SEC\_CERT\_REV\_FAILED**
-
-
12057
-
Revocation of the SSL certificate failed.
-
**ERROR\_INTERNET\_SEC\_CERT\_REVOKED**
-
-
12170
-
The SSL certificate was revoked.
-
**ERROR\_INTERNET\_SEC\_INVALID\_CERT**
-
-
12169
-
The SSL certificate is invalid.
-
**ERROR\_INTERNET\_SECURITY\_CHANNEL\_ERROR**
-
-
12157
-
The application experienced an internal error loading the SSL libraries.
-
**ERROR\_INTERNET\_SERVER\_UNREACHABLE**
-
-
12164
-
The website or server indicated is unreachable.
-
**ERROR\_INTERNET\_SHUTDOWN**
-
-
12012
-
WinINet support is being shut down or unloaded.
-
**ERROR\_INTERNET\_TCPIP\_NOT\_INSTALLED**
-
-
12159
-
The required protocol stack is not loaded and the application cannot start WinSock.
-
**ERROR\_INTERNET\_TIMEOUT**
-
-
12002
-
The request has timed out.
-
**ERROR\_INTERNET\_UNABLE\_TO\_CACHE\_FILE**
-
-
12158
-
The function was unable to cache the file.
-
**ERROR\_INTERNET\_UNABLE\_TO\_DOWNLOAD\_SCRIPT**
-
-
12167
-
The automatic proxy configuration script could not be downloaded. The INTERNET\_FLAG\_MUST\_CACHE\_REQUEST flag was set.
-
**ERROR\_INTERNET\_UNRECOGNIZED\_SCHEME**
-
-
12006
-
The URL scheme could not be recognized, or is not supported.
-
**ERROR\_INVALID\_HANDLE**
-
-
The handle that was passed to the API has been either invalidated or closed.
**Header:** Declared in Winerror.h
-
**ERROR\_MORE\_DATA**
-
-
More data is available.
**Header:** Declared in Winerror.h
-
**ERROR\_NO\_MORE\_FILES**
-
-
No more files have been found.
**Header:** Declared in Winerror.h
-
**ERROR\_NO\_MORE\_ITEMS**
-
-
No more items have been found.
**Header:** Declared in Winerror.h
## Remarks
> [!Note]
> WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use [Microsoft Windows HTTP Services (WinHTTP)](/windows/desktop/WinHttp/winhttp-start-page).
## Requirements
| Requirement | Value |
|-------------------------------------|--------------------------------------------------------------------------------------|
| Minimum supported client
| Windows 2000 Professional \[desktop apps only\]
|
| Minimum supported server
| Windows 2000 Server \[desktop apps only\]
|
| Header
| - Wininet.h
|