Cannot Retrieve Custom HTTP Variables That Contain an Underscore

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
IIS cannot retrieve custom HTTP header variables that contain an underscore following "HTTP_" (for example, "HTTP_SM_TESTVARIABLE"). The value returned for the header variable is NULL.
Cause
Any underscore ( _ ) that follows "HTTP_" is incorrectly converted to a dash when IIS attempts to retrieve the custom header value for the variable, and therefore, the variable is not found.
Workaround
Do not use an underscore in the custom HTTP header variable name.

-OR-

Retrieve and parse the HTTP_ALL header variable for the custom HTTP header variable.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Properties

Article ID: 294217 - Last Review: 01/16/2015 22:07:58 - Revision: 3.0

  • kbnosurvey kbarchive kbbug kbpending KB294217
Feedback