Hosting a HTTP service with ASP.NET-compatible context
ASP.NET provides a powerful platform for developing web applications over the .NET framework. An ASP.NET web application is also a natural hosting environment for a WCF service over the web HTTP protocol, which means developers can deploy WCF services with ASP.NET web pages in the same web application side by side without any particular effort.
However, by default, some ASP.NET runtime features or state objects are not available to WCF service code even if they are within the same web application. Those limited features include:
HttpContext is always null when accessed from within a WCF service.
Configuration-based URL Authorization (via
<authorization>
configuration element) is not available to WCF.svc
files. These settings are ignored for WCF requests if a service resides in a URL space secured by ASP.NET's URL authorization rules.Custom HttpModules injected into an ASP.NET application to intercept requests at later stages of...