How can I read Authorization header information from a REST based WCF service?
Asked
Active
Viewed 5,272 times
2 Answers
14
Actually since you ask for a REST based WCF service I think you should use
WebOperationContext.Current.IncomingRequest.Headers
in order to get the HTTP headers in the request.

Cellfish
- 2,202
- 18
- 20
-
3I used this to read the Authorization header: `var auth = WebOperationContext.Current.IncomingRequest.Headers["Authorization"];` – Nicklas Savonen Jun 15 '12 at 07:28
5
You are trying to read the http header.
OperationContext.Current.OutgoingMessageProperties
or
OperationContext.Current.IncomingMessageProperties

Ray Lu
- 26,208
- 12
- 60
- 59