In WCF (System.Net.WebHeaderCollection), the header value can be restored using either the System.Net.HttpRequestHeader enumeration or the header line:
WebOperationContext.Current.IncomingRequest.Headers[httpRequestHeaderEnum]
// or
WebOperationContext.Current.IncomingRequest.Headers.Get(rawHeaderString)
But in ASP.NET, the headers are in the NameValueCollection, which only accepts the header line:
HttpContext.Current.Request.Headers[rawHeaderString]
To use Enum for ASP.NET, where is the map from enum System.Net.HttpRequestHeader located in its header line?
source
share