Error Message: Error 406, No Acceptable Objects Were Found

Article translations Article translations
Article ID: 251215 - View products that this article applies to.
This article was previously published under Q251215
Expand all | Collapse all

On This Page


When you use the Accept-Language header and the file name specified does not include the file extension, the following error message occurs:
Error 406, No acceptable objects were found.


Because no other "Accept:" headers are specified, the Web server determines that the client can only handle text/plain and text/html content types. Because the document has no extension, the type is octet/stream, which causes the error message to be returned. This is by design.


Include the file extension in the request, so that the content type can be determined.


Steps to Reproduce Behavior

The following portion of code causes the Error 406:
hHandle = HttpOpenRequest(hInetConnect, "GET", "/document");
HttpAddRequestHeaders(hHandle "Accept-Language:en-us\r\n");
HttpSendRequest (hHandle);
InternetReadFile (hHandle, lpBuffer);


Article ID: 251215 - Last Review: June 24, 2004 - Revision: 3.0
  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Windows Internet Services (WinInet)
kberrmsg kbpending kbprb KB251215
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from