Allowing Access to HttpContext in WCF REST Services
Posted by: Rick Strahls WebLog,
on 10 Jan 2011 |
View original | Bookmarked: 0 time(s)
If youre building WCF REST Services you may find that WCFs OperationContext, which provides some amount of access to Http headers on inbound and outbound messages, is pretty limited in that it doesnt provide access to everything and sometimes in a not so convenient manner. For example accessing query string parameters explicitly is pretty painful: [OperationContract]
[WebGet]
public string HelloWorld()
{
var properties = OperationContext.Current.IncomingMessageProperties;
var property =...