I have a requirement to access the HttpContext.Current from with-in a RESTful WCF service. I know I am able to achieve this by adding the following to config:
&
It's an AppDomain-wide setting that you can set on the static ServiceHostingEnvironment
class in System.ServiceModel:
ServiceHostingEnvironment.AspNetCompatibilityEnabled = true;
This should be done before you create and open your service hosts.
Would have been nice - but it's a read-only setting, and the only way to set it appears to be through configuration :-(