Sunday, September 19, 2010

WCF Hosting Options: (WCF Part 5)


Options for Hosting a WCF Service:

  1. Internet Information Server (IIS): WCF services can be hosted within Internet Information Services, which provides a number of advantages if the service uses HTTP as its transport protocol.

  2. Windows Activation Service: is the new process activation mechanism that is a feature of IIS 7.0. IIS 7.0 is a part of Microsoft Windows Vista and the newly released Microsoft Windows Server 2008.

  3. Self Hostd:WCF services can be hosted inside any .NET managed application, such as console applications and Windows Forms or Windows Presentation Foundation (WPF) graphical applications.


    ServiceHost myHost = new ServiceHost(typeof(MyService), baseAddress);
    myHost.Open(); //to start the service


  4. Managed Windows Service:A WCF service can be registered as a Windows Service, so that it is under control of the Windows Service Control Manager (SCM).

    This is suitable for long-running WCF services that are hosted outside of IIS in a secure environment and are not message- activated.

    To host a WCF service in this way, the application must be written as a Managed Windows Service by inheriting from System.ServiceProcess.ServiceBase

    It must also implement a WCF service contract interface and then create and open a ServiceHost to manage the WCF service.

  For More Info Please Visit: WCF Resources Page  

No comments:

Post a Comment

Search This Blog