Configuring WCF and Web Services

In CCF 2009, .asmx Web services have been migrated to Windows Communication Foundation (WCF) and carry a .svc file type suffix. The programming model of WCF, called the System.ServiceModel, is built on the Microsoft .NET Framework and simplifies the development of connected systems. Although the CCF Installer handles the installation of Web services and WCF, some manual configuration is required.

WCF Service Configuration Options

To host the new WCF Web services in IIS, you must enable anonymous access for the .svc files in the Web services.

To enable anonymous access

  1. On the Start menu, click All Programs, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
  2. On the IIS page, expand the <Svr> node (where <Svr> is the name of your IIS server).
  3. Expand the Web Sites node.
  4. Expand the Default Web Sites node.
  5. Select the virtual directory.
  6. Right-click the .svc file name, and select Properties.
  7. Select the File Security tab.
  8. Under Authentication and access control, click Edit.
  9. Select the Enable anonymous access check box.
  10. Reset the IIS machine.

Configuring WCF Security

Windows Communication Foundation offers many security options, including transfer security, access control, and auditing. Each security option performs different functions, such as integrity, confidentiality, authentication, and authorization. You can use configuration files to configure any of these security options. Depending on your implementation, you can configure the security options that are appropriate for your environment. To find out more about WCF security, go to https://msdn2.microsoft.com/en-us/library/ms732362.aspx.

For demonstration purposes, CCF is shipped with the following WCF security configuration:

  • To make use of URL/file–based authorization and because WCF Web services are hosted in IIS, ASP.NET compatibility mode must be enabled. In the Web.config files of each of the Web services, this mode is enabled by an XML statement, as shown in the following example:

  • <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    
  • Binding is set to basicHttpBinding, a binding that is suitable for communicating with WS-Basic Profile–conformant Web services (for example, ASMX-based services). This binding uses HTTP as the transport and Text/XML as the default message encoding.

  • Security mode is set to TransportCredentialsOnly. This mode does not provide message integrity and confidentiality. It provides HTTP-based client authentication only.