Binding a WCF service to the HTTP context

None
Licensing
10/17/2013

The ASP.NET Domain license depends on the HTTP context. By default a WCF service does not bind to an HTTP context.

That is why the result of HttpCurrent.Context is always null causing the license verification to fail. This can be solved by enabling ASP Compabilty Mode in web.config as follows:

1 <system.serviceModel> 2 <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/> 3 ... 4 </system.serviceModel>