BITS Return Values

The Bitsmsg.h file contains the following return value constants. The constants represent return values that BITS generates and HTTP return values that BITS captures. All other return values that you can receive are COM, RPC, or converted Windows return values (BITS uses the HRESULT_FROM_WIN32 macro to convert the Windows return values to HRESULT values).

Note that the Bitsmsg.h file contains additional return values not listed below.

BG_S_PARTIAL_COMPLETE (0x00200017)

A subset of the job's files transferred successfully before the IBackgroundCopyJob::Complete method was called. Those that were not complete were deleted.

BG_S_UNABLE_TO_DELETE_FILES (0x0020001A)

Unable to delete all temporary files associated with the job.

BG_S_OVERRIDDEN_BY_POLICY (0x00200055)

The configuration preference has been saved successfully, but the preference will not be used because a configured Group Policy setting overrides the preference.

BG_E_NOT_FOUND (0x80200001)

The requested job was not found.

BG_E_INVALID_STATE (0x80200002)

The requested action is not allowed in the current job state.

BG_E_EMPTY (0x80200003)

The job must contain one or more files before you can resume the job.

BG_E_FILE_NOT_AVAILABLE (0x80200004)

File information is not available because the error is not associated with a local or remote file.

BG_E_PROTOCOL_NOT_AVAILABLE (0x80200005)

Protocol information is not available because the error is not associated with the specified transfer protocol.

BG_E_DESTINATION_LOCKED (0x8020000D)

The destination file system volume, specified in the local file name, is locked.

BG_E_VOLUME_CHANGED (0x8020000E)

The destination volume, specified in the local file name, has changed. For example, the original floppy disk has been replaced with a different floppy disk.

BG_E_ERROR_INFORMATION_UNAVAILABLE (0x8020000F)

Error information is only available when the state of the job is BG_JOB_STATE_ERROR. The error information is not available after BITS begins transferring the job's data or the client exits.

BG_E_NETWORK_DISCONNECTED (0x80200010)

The network adapter is inactive or disconnected. All jobs are placed in the BG_JOB_STATE_TRANSIENT_ERROR state.

BG_E_MISSING_FILE_SIZE (0x80200011)

The server did not return the file size. BITS only transfers static content and requires the HTTP server to return the Content-Length header. The transfer request fails if the URL points to dynamic content.

BG_E_INSUFFICIENT_HTTP_SUPPORT (0x80200012)

The server does not support the HTTP/1.1 protocol.

BG_E_INSUFFICIENT_RANGE_SUPPORT (0x80200013)

The server does not support the Content-Range header. Typically, you receive this error when you try to download dynamic content. You can also receive this error if an intermediate proxy is removing the Content-Range or Content-Length header.

BG_E_REMOTE_NOT_SUPPORTED (0x80200014)

Remote use of BITS is not supported. For more information, see Users and Network Connections.

BG_E_NEW_OWNER_DIFF_MAPPING (0x80200015)

The network drive mapping for the local file is different for the current owner than for the previous owner.

BG_E_NEW_OWNER_NO_FILE_ACCESS (0x80200016)

The new owner has insufficient permissions to the temporary job files.

BG_E_PROXY_LIST_TOO_LARGE (0x80200018)

The HTTP proxy list is too long. The list must not exceed 32 KB.

BG_E_PROXY_BYPASS_LIST_TOO_LARGE (0x80200019)

The HTTP proxy bypass list is too long. The list must not exceed 32 KB.

BG_E_TOO_MANY_FILES (0x8020001C)

You cannot add more than one file to an upload job.

BG_E_LOCAL_FILE_CHANGED (0x8020001D)

The contents of the local file changed after the transfer process began. The contents of the local file cannot change after the transfer process begins on an upload or upload-reply job.

BG_E_TOO_LARGE (0x80200020)

The size of the upload file exceeds the maximum allowed upload size specified on the server.

BG_E_STRING_TOO_LONG (0x80200021)

The specified string is too long.

BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH (0x80200022)

The client and server were unable to negotiate a protocol to use for the upload job.

BG_E_SERVER_EXECUTE_ENABLED (0x80200023)

Scripting or execute permissions are enabled on the IIS virtual directory associated with the job. To upload files to the virtual directory, disable the scripting and execute permissions on the virtual directory.

BG_E_USERNAME_TOO_LARGE (0x80200025)

The user name cannot exceed 300 characters.

BG_E_PASSWORD_TOO_LARGE (0x80200026)

The password cannot exceed 65535 characters.

BG_E_INVALID_AUTH_TARGET (0x80200027)

The specified authentication target is not valid.

BG_E_INVALID_AUTH_SCHEME (0x80200028)

The specified authentication scheme is not valid.

BG_E_INVALID_RANGE (0x8020002B)

The specified byte range is invalid. The byte range must exist within the specified remote file.

BG_E_OVERLAPPING_RANGES (0x8020002C)

The list of byte ranges contains overlapping or duplicate ranges, which are not supported.

BG_E_BLOCKED_BY_POLICY (0x8020003E)

Group Policy settings prevent background jobs from running at this time. For details, see the MaxInternetBandwidth policy.

BG_E_INVALID_PROXY_INFO (0x8020003F)

Run-time error that indicates the proxy list or proxy bypass list that you specified using the IBackgroundCopyJob::SetProxySettings method is invalid.

BG_E_INVALID_CREDENTIALS (0x80200040)

The format of the supplied security credentials is not valid.

BG_E_RECORD_DELETED (0x80200042)

The cache record has been deleted. The attempt to update it has been abandoned.

BG_E_UPNP_ERROR (0x80200045)

A Universal Plug and Play (UPnP) error has occurred. Please check your Internet Gateway Device.

BG_E_PEERCACHING_DISABLED (0x80200047)

Peer-caching is disabled.

BG_E_BUSYCACHERECORD (0x80200048)

The cache record is in use and cannot be changed or deleted. Try again after a few seconds.

BG_E_TOO_MANY_JOBS_PER_USER (0x80200049)

The job count for the user has exceeded the per user job limit set by the MaxJobsPerUser Group Policy setting.

BG_E_TOO_MANY_JOBS_PER_MACHINE (0x80200050)

The job count for the computer has exceeded the per computer job limit set by the MaxJobsPerMachine Group Policy setting.

BG_E_TOO_MANY_FILES_IN_JOB (0x80200051)

The file count for the job has exceeded the per job file limit set by the MaxFilesPerJob Group Policy setting.

BG_E_TOO_MANY_RANGES_IN_FILE (0x80200052)

The range count for the file has exceeded the per file range limit set by the MaxRangesPerFile Group Policy setting.

BG_E_VALIDATION_FAILED (0x80200053)

The application requested data from a website, but the response was not valid. For details, use Event Viewer to view the Application Logs\Microsoft\Windows\Bits-client\Operational log.

BG_E_MAXDOWNLOAD_TIMEOUT (0x80200054)

BITS timed out downloading the job. The download did not complete within the maximum download time set on the job or the MaxDownloadTime Group Policy setting.

BG_E_HTTP_ERROR_400 (0x80190190)

The server could not process the transfer request because the syntax of the remote file name is invalid.

BG_E_HTTP_ERROR_401 (0x80190191)

The user does not have permission to access the remote file. The requested resource requires user authentication.

BG_E_HTTP_ERROR_404 (0x80190194)

The requested URL does not exist on the server.

In IIS 7, this error can indicate

  • That BITS uploads are not enabled on the virtual directory (vdir) on the server.
  • That the upload size exceeds the maximum upload limit (for details, see the BITSMaximumUploadSize IIS extension property).

BG_E_HTTP_ERROR_407 (0x80190197)

The user does not have permission to access the proxy. The proxy requires user authentication.

BG_E_HTTP_ERROR_414 (0x8019019E)

The server cannot process the transfer request. The Uniform Resource Identifier (URI) in the remote file name is longer than the server can interpret.

BG_E_HTTP_ERROR_501 (0x801901F5)

The server does not support the functionality required to fulfill the request. In IIS 6, this error indicates that BITS uploads are not enabled on the virtual directory (vdir) on the server.

BG_E_HTTP_ERROR_503 (0x801901F7)

The service is temporarily overloaded and cannot process the request. Resume the job at a later time.

BG_E_HTTP_ERROR_504 (0x801901F8)

The transfer request timed out while waiting for a gateway. Resume the job at a later time.

BG_E_HTTP_ERROR_505 (0x801901F9)

The server does not support the HTTP protocol version specified in the remote file name.

The Bitsmsg.h header file contains additional HTTP return values not listed above that BITS uses internally. For information on these and other HTTP return values you can receive, see the RFC 2616 specification from the Internet Engineering Task Force at https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.