Friday, August 03, 2007

* WCF : Overview of Hosting in IIS

Previous Post <<-- WCF Tool : ServiceModel Metadata Utility Tool (Svcutil.exe)

  • WCF services hosted in IIS get all the benefits of IIS environment like scalability, recycling, etc.
  • Can be hosted on IIS 5.1, 6.0 and 7.0
  • 5.1 is recommended only for development while 6.0 and 7.0 can be used for production.
  • 6.0 supports only http but as IIS 7.0 uses Windows Activation Service (WAS) for protocol activation and communication, protocols other than http are also supported.
  • Before WCF services can be hosted in IIS, a WC HTTP activation component (ServiceModel) needs to be installed and registered in IIS.
  • You can verify the installation of this component using tool called ServiceModel Registration Tool.
  • WCF services can be hosted in same AppDomain as ASP.NET application in two modes : 1) Side-by-Side 2) ASP.NET Compatibility Mode
  • In 'Side-by-Side' ASP.NET and WCF share the AppDomain state & so static variables etc. But ASP.NET HTTP Runtime process only ASP.NET requests and doesn't participate in processing of WCF requests. HttpContext, HttpModules and ASP.NET Impersonation features are not available to WCF services. WCF Services can communicate on protocols other than HTTP on IIS 7.0.
  • In 'ASP.NET Compatibility Mode', WCF requests participate in HTTP request pipeline and thus can't communicate over other protocols other than HTTP.
  • WCF Services code can be deployed on IIS either in App_Code folder as source files or as compiled assembly in bin folder of Virtual Directory.

Next Post -> WCF Tool : WCF IIS Registration Tool (ServiceModelReg.exe)

No comments:

Post a Comment