Vincent Leung .NET Tech Clips

The latest tech clips from the .NET community

Accessing ASP.NET Session, Request, Response (HttpContext / HttpApplication) in WCF

 

WCF services are designed to be transport independent. Even when they are hosted inside ASP.NET applications, the decoupling of the relationship to the HTTP-flavored features is required so that users are not confused. Also most of those ASP.NET features have counterparts in WCF. Nevertheless, WCF provides a mechanism to support smooth migration from ASMX to WCF by introducing two different hosting modes for WCF services:

  • Mixed Transports Mode
  • ASP.NET compatibility mode

This is controlled by the application-level configuration flag “aspNetCompatibilityEnabled”:

<system.serviceModel>

<serviceHostingEnvironment aspNetCompatibilityEnabled=”true”/>

</system.serviceModel>

This flag is false by default.

Details from Wenlong Dong’s Blog : ASP.NET Compatibility Mode

March 29, 2008 - Posted by Vincent Leung | ASP.NET, WCF | | No Comments Yet

No comments yet.

Leave a comment