How do I use % Feature X% from ASP.NET in a WCF service? ASP.NET has an HTTP-centric application model with many great features specialized for web development in IIS. WCF is transport and host agnostic. Out of the box, WCF supports most of the features of ASP.NET in a way that makes sense independent of HTTP and IIS. Some of the features excluded from that set are supported as part of the specific implementation for the HTTP transport. If you're porting an application from ASP.NET to WCF, you may find that one of the ASP.NET features not in the regularly supported subset has been made integral to the design of your application. WCF has an ASP.NET compatibility mode that gives you both the features and limitations of that environment. Using compatibility mode gets you your favorite ASP.NET %Feature X%: Session state System.Web authorization, impersonation, and globalization IHttpModule AppSettings HttpContext MapPath but the preference should be to use host and transport agnostic equivalents except when trying to get code working that already use these ASP.NET features. This article was originally just about Server.MapPath, but I changed it because advice for the other features would read exactly the same. Next time: Flow Throttles
Read More...