Microsoft Knowledge Base Email Alertz

(251215) - 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.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 251215 - Last Review: June 24, 2004 - Revision: 3.0

Error Message: Error 406, No Acceptable Objects Were Found

This article was previously published under Q251215

On This Page

SYMPTOMS

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.

CAUSE

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.

RESOLUTION

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

MORE INFORMATION

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);
				

APPLIES TO
  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Windows Internet Services (WinInet)
Keywords: 
kberrmsg kbpending kbprb KB251215
Retired KB ArticleRetired 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.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate