diff --git a/docs/framework/wcf/configuration-editor-tool-svcconfigeditor-exe.md b/docs/framework/wcf/configuration-editor-tool-svcconfigeditor-exe.md
index 315a8511e655f..e6b34e463af49 100644
--- a/docs/framework/wcf/configuration-editor-tool-svcconfigeditor-exe.md
+++ b/docs/framework/wcf/configuration-editor-tool-svcconfigeditor-exe.md
@@ -69,7 +69,7 @@ The viewer automatically follows the configuration merge path and creates a view
### Services
-The **Services** node displays all of the services currently assigned in the configuration file. Each sub-node in the tree corresponds to a sub-element of the <`services`> element in the configuration file.
+The **Services** node displays all of the services currently assigned in the configuration file. Each sub-node in the tree corresponds to a sub-element of the `` element in the configuration file.
When you click the **Services** node, you can view or perform tasks on the service Summary Page in the **Detail** Pane.
@@ -116,7 +116,7 @@ You can create a new service endpoint configuration in the following ways:
### Client
-The **Client** node displays all of the client endpoints in the configuration file. Every sub-node in the tree corresponds to a sub-element of the <`client`> element in the configuration file.
+The **Client** node displays all of the client endpoints in the configuration file. Every sub-node in the tree corresponds to a sub-element of the `` element in the configuration file.
When you click the **Client** node, you can view or perform tasks on the client **Summary Page** in the **Detail Pane**.
@@ -176,7 +176,7 @@ If the standard endpoint is in used, a warning message is displayed when you att
Binding configurations are used to configure bindings on endpoints. Such configuration settings are stored in the **Binding** node. Endpoints reference binding configurations by name and multiple endpoints can reference a single binding configuration.
-The **Bindings** node displays all of the binding settings in the configuration file. Every sub-node in the tree corresponds to a sub-element in the <`bindings`> element in the configuration file.
+The **Bindings** node displays all of the binding settings in the configuration file. Every sub-node in the tree corresponds to a sub-element in the `` element in the configuration file.
When you click the **Bindings** node, you can view or perform tasks on the binding **Summary Page** in the **Detail Pane**.
@@ -220,7 +220,7 @@ A custom binding is a collection of binding elements that form a stack. Each bin
### Diagnostics
-The **Diagnostics** node displays all of the diagnostic settings in the configuration file. It enables you to turn performance counters on or off, enable or disable Windows Management Instrumentation (WMI), configure WCF tracing, and configure WCF message logging. The settings in the **Diagnostics** node correspond to the <`system.diagnostics`> section, and `` section in `` in the configuration file.
+The **Diagnostics** node displays all of the diagnostic settings in the configuration file. It enables you to turn performance counters on or off, enable or disable Windows Management Instrumentation (WMI), configure WCF tracing, and configure WCF message logging. The settings in the **Diagnostics** node correspond to the `` section, and `` section in `` in the configuration file.
When you click the **Diagnostics** node, you can view or perform tasks on the diagnostics **Summary Page** in the **Detail Pane**.
@@ -384,7 +384,7 @@ One way to create a new configuration file is to use the New Service Element Wiz
## Configuring COM+
-The Service Configuration Editor enables you to create a new configuration file for an existing COM+ application, or edit an existing COM+ configuration. The **COM Contract** node is only visible when the <`comContract`> section exists in the configuration file.
+The Service Configuration Editor enables you to create a new configuration file for an existing COM+ application, or edit an existing COM+ configuration. The **COM Contract** node is only visible when the `` section exists in the configuration file.
### Creating a New COM+ Configuration
diff --git a/docs/framework/wcf/configuring-services-using-configuration-files.md b/docs/framework/wcf/configuring-services-using-configuration-files.md
index d7cacf0b90554..515ea1a984d3f 100644
--- a/docs/framework/wcf/configuring-services-using-configuration-files.md
+++ b/docs/framework/wcf/configuring-services-using-configuration-files.md
@@ -2,273 +2,273 @@
title: "Configuring Services Using Configuration Files"
description: Learn how a configuration file for a WCF service gives you the flexibility of providing endpoint and service behavior data during deployment.
ms.date: "03/30/2017"
-helpviewer_keywords:
+helpviewer_keywords:
- "configuring services [WCF]"
ms.assetid: c9c8cd32-2c9d-4541-ad0d-16dff6bd2a00
---
# Configuring Services Using Configuration Files
-Configuring a Windows Communication Foundation (WCF) service with a configuration file gives you the flexibility of providing endpoint and service behavior data at the point of deployment instead of at design time. This topic outlines the primary techniques available.
-
- A WCF service is configurable using the .NET Framework configuration technology. Most commonly, XML elements are added to the Web.config file for an Internet Information Services (IIS) site that hosts a WCF service. The elements allow you to change details such as the endpoint addresses (the actual addresses used to communicate with the service) on a machine-by-machine basis. In addition, WCF includes several system-provided elements that allow you to quickly select the most basic features for a service. Starting with .NET Framework 4, WCF comes with a new default configuration model that simplifies WCF configuration requirements. If you do not provide any WCF configuration for a particular service, the runtime automatically configures your service with some standard endpoints and default binding/behavior. In practice, writing configuration is a major part of programming WCF applications.
-
- For more information, see [Configuring Bindings for Services](configuring-bindings-for-wcf-services.md). For a list of the most commonly used elements, see [System-Provided Bindings](system-provided-bindings.md). For more information about default endpoints, bindings, and behaviors, see [Simplified Configuration](simplified-configuration.md) and [Simplified Configuration for WCF Services](./samples/simplified-configuration-for-wcf-services.md).
-
+Configuring a Windows Communication Foundation (WCF) service with a configuration file gives you the flexibility of providing endpoint and service behavior data at the point of deployment instead of at design time. This topic outlines the primary techniques available.
+
+ A WCF service is configurable using the .NET Framework configuration technology. Most commonly, XML elements are added to the Web.config file for an Internet Information Services (IIS) site that hosts a WCF service. The elements allow you to change details such as the endpoint addresses (the actual addresses used to communicate with the service) on a machine-by-machine basis. In addition, WCF includes several system-provided elements that allow you to quickly select the most basic features for a service. Starting with .NET Framework 4, WCF comes with a new default configuration model that simplifies WCF configuration requirements. If you do not provide any WCF configuration for a particular service, the runtime automatically configures your service with some standard endpoints and default binding/behavior. In practice, writing configuration is a major part of programming WCF applications.
+
+ For more information, see [Configuring Bindings for Services](configuring-bindings-for-wcf-services.md). For a list of the most commonly used elements, see [System-Provided Bindings](system-provided-bindings.md). For more information about default endpoints, bindings, and behaviors, see [Simplified Configuration](simplified-configuration.md) and [Simplified Configuration for WCF Services](./samples/simplified-configuration-for-wcf-services.md).
+
> [!IMPORTANT]
-> When deploying side by side scenarios where two different versions of a service are deployed, it is necessary to specify partial names of assemblies referenced in configuration files. This is because the configuration file is shared across all versions of a service and they could be running under different versions of the .NET Framework.
-
-## System.Configuration: Web.config and App.config
-
- WCF uses the System.Configuration configuration system of the .NET Framework.
-
- When configuring a service in Visual Studio, use either a Web.config file or an App.config file to specify the settings. The choice of the configuration file name is determined by the hosting environment you choose for the service. If you are using IIS to host your service, use a Web.config file. If you are using any other hosting environment, use an App.config file.
-
- In Visual Studio, the file named App.config is used to create the final configuration file. The final name actually used for the configuration depends on the assembly name. For example, an assembly named "Cohowinery.exe" has a final configuration file name of "Cohowinery.exe.config". However, you only need to modify the App.config file. Changes made to that file are automatically made to the final application configuration file at compile time.
-
- In using an App.config, file the configuration system merges the App.config file with content of the Machine.config file when the application starts and the configuration is applied. This mechanism allows machine-wide settings to be defined in the Machine.config file. The App.config file can be used to override the settings of the Machine.config file; you can also lock in the settings in Machine.config file so that they get used. In the Web.config case, the configuration system merges the Web.config files in all directories leading up to the application directory into the configuration that gets applied. For more information about configuration and the setting priorities, see topics in the namespace.
-
-## Major Sections of the Configuration File
-
- The main sections in the configuration file include the following elements.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
> [!NOTE]
-> The bindings and behaviors sections are optional and are only included if required.
-
-### The \ Element
-
- The `services` element contains the specifications for all services the application hosts. Starting with the simplified configuration model in .NET Framework 4, this section is optional.
-
- [\](../configure-apps/file-schema/wcf/services.md)
-
-### The \ Element
-
- Each service has these attributes:
-
-- `name`. Specifies the type that provides an implementation of a service contract. This is a fully qualified name which consists of the namespace, a period, and then the type name. For example `"MyNameSpace.myServiceType"`.
-
-- `behaviorConfiguration`. Specifies the name of one of the `behavior` elements found in the `behaviors` element. The specified behavior governs actions such as whether the service allows impersonation. If its value is the empty name or no `behaviorConfiguration` is provided then the default set of service behaviors is added to the service.
-
-- [\](../configure-apps/file-schema/wcf/service.md)
-
-### The \ Element
-
- Each endpoint requires an address, a binding, and a contract, which are represented by the following attributes:
-
-- `address`. Specifies the service's Uniform Resource Identifier (URI), which can be an absolute address or one that is given relative to the base address of the service. If set to an empty string, it indicates that the endpoint is available at the base address that is specified when creating the for the service.
-
-- `binding`. Typically specifies a system-provided binding like , but can also specify a user-defined binding. The binding specified determines the type of transport, security and encoding used, and whether reliable sessions, transactions, or streaming is supported or enabled.
-
-- `bindingConfiguration`. If the default values of a binding must be modified, this can be done by configuring the appropriate `binding` element in the `bindings` element. This attribute should be given the same value as the `name` attribute of the `binding` element that is used to change the defaults. If no name is given, or no `bindingConfiguration` is specified in the binding, then the default binding of the binding type is used in the endpoint.
-
-- `contract`. Specifies the interface that defines the contract. This is the interface implemented in the common language runtime (CLR) type specified by the `name` attribute of the `service` element.
-
-- [\](../configure-apps/file-schema/wcf/endpoint-element.md)
-
-### The \ Element
-
- The `bindings` element contains the specifications for all bindings that can be used by any endpoint defined in any service.
-
- [\](../configure-apps/file-schema/wcf/bindings.md)
-
-### The \ Element
-
- The `binding` elements contained in the `bindings` element can be either one of the system-provided bindings (see [System-Provided Bindings](system-provided-bindings.md)) or a custom binding (see [Custom Bindings](./extending/custom-bindings.md)). The `binding` element has a `name` attribute that correlates the binding with the endpoint specified in the `bindingConfiguration` attribute of the `endpoint` element. If no name is specified then that binding corresponds to the default of that binding type.
-
+> The bindings and behaviors sections are optional and are only included if required.
+
+### The \ Element
+
+ The `services` element contains the specifications for all services the application hosts. Starting with the simplified configuration model in .NET Framework 4, this section is optional.
+
+ [\](../configure-apps/file-schema/wcf/services.md)
+
+### The \ Element
+
+ Each service has these attributes:
+
+- `name`. Specifies the type that provides an implementation of a service contract. This is a fully qualified name which consists of the namespace, a period, and then the type name. For example `"MyNameSpace.myServiceType"`.
+
+- `behaviorConfiguration`. Specifies the name of one of the `behavior` elements found in the `behaviors` element. The specified behavior governs actions such as whether the service allows impersonation. If its value is the empty name or no `behaviorConfiguration` is provided then the default set of service behaviors is added to the service.
+
+- [\](../configure-apps/file-schema/wcf/service.md)
+
+### The \ Element
+
+ Each endpoint requires an address, a binding, and a contract, which are represented by the following attributes:
+
+- `address`. Specifies the service's Uniform Resource Identifier (URI), which can be an absolute address or one that is given relative to the base address of the service. If set to an empty string, it indicates that the endpoint is available at the base address that is specified when creating the for the service.
+
+- `binding`. Typically specifies a system-provided binding like , but can also specify a user-defined binding. The binding specified determines the type of transport, security and encoding used, and whether reliable sessions, transactions, or streaming is supported or enabled.
+
+- `bindingConfiguration`. If the default values of a binding must be modified, this can be done by configuring the appropriate `binding` element in the `bindings` element. This attribute should be given the same value as the `name` attribute of the `binding` element that is used to change the defaults. If no name is given, or no `bindingConfiguration` is specified in the binding, then the default binding of the binding type is used in the endpoint.
+
+- `contract`. Specifies the interface that defines the contract. This is the interface implemented in the common language runtime (CLR) type specified by the `name` attribute of the `service` element.
+
+- [\](../configure-apps/file-schema/wcf/endpoint-element.md)
+
+### The \ Element
+
+ The `bindings` element contains the specifications for all bindings that can be used by any endpoint defined in any service.
+
+ [\](../configure-apps/file-schema/wcf/bindings.md)
+
+### The \ Element
+
+ The `binding` elements contained in the `bindings` element can be either one of the system-provided bindings (see [System-Provided Bindings](system-provided-bindings.md)) or a custom binding (see [Custom Bindings](./extending/custom-bindings.md)). The `binding` element has a `name` attribute that correlates the binding with the endpoint specified in the `bindingConfiguration` attribute of the `endpoint` element. If no name is specified then that binding corresponds to the default of that binding type.
+
For more information about configuring services and clients, see [Configuring WCF services](configuring-services.md).
-
- [\](../configure-apps/file-schema/wcf/bindings.md)
-
-### The \ Element
-
- This is a container element for the `behavior` elements that define the behaviors for a service.
-
- [\](../configure-apps/file-schema/wcf/behaviors.md)
-
-### The \ Element
-
- Each `behavior` element is identified by a `name` attribute and provides either a system-provided behavior, such as <`throttling`>, or a custom behavior. If no name is given then that behavior element corresponds to the default service or endpoint behavior.
-
- [\](../configure-apps/file-schema/wcf/behavior-of-servicebehaviors.md)
-
-## How to Use Binding and Behavior Configurations
-
- WCF makes it easy to share configurations between endpoints using a reference system in configuration. Rather than directly assigning configuration values to an endpoint, binding-related configuration values are grouped in `bindingConfiguration` elements in the `` section. A binding configuration is a named group of settings on a binding. Endpoints can then reference the `bindingConfiguration` by name.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
+
+ [\](../configure-apps/file-schema/wcf/bindings.md)
+
+### The \ Element
+
+ This is a container element for the `behavior` elements that define the behaviors for a service.
+
+ [\](../configure-apps/file-schema/wcf/behaviors.md)
+
+### The \ Element
+
+ Each `behavior` element is identified by a `name` attribute and provides either a system-provided behavior, such as ``, or a custom behavior. If no name is given then that behavior element corresponds to the default service or endpoint behavior.
+
+ [\](../configure-apps/file-schema/wcf/behavior-of-servicebehaviors.md)
+
+## How to Use Binding and Behavior Configurations
+
+ WCF makes it easy to share configurations between endpoints using a reference system in configuration. Rather than directly assigning configuration values to an endpoint, binding-related configuration values are grouped in `bindingConfiguration` elements in the `` section. A binding configuration is a named group of settings on a binding. Endpoints can then reference the `bindingConfiguration` by name.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+ bindingConfiguration="myBindingConfiguration1"
+ contract="MyContract" />
+ bindingConfiguration="myBindingConfiguration2"
+ contract="MyContract" />
-
-
-
-
-```
-
- The `name` of the `bindingConfiguration` is set in the `` element. The `name` must be a unique string within the scope of the binding type—in this case the [](../configure-apps/file-schema/wcf/basichttpbinding.md), or an empty value to refer to the default binding. The endpoint links to the configuration by setting the `bindingConfiguration` attribute to this string.
-
- A `behaviorConfiguration` is implemented the same way, as illustrated in the following sample.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ contract="MyContract" />
+
+
+
+
+```
+
+ The `name` of the `bindingConfiguration` is set in the `` element. The `name` must be a unique string within the scope of the binding type—in this case the [](../configure-apps/file-schema/wcf/basichttpbinding.md), or an empty value to refer to the default binding. The endpoint links to the configuration by setting the `bindingConfiguration` attribute to this string.
+
+ A `behaviorConfiguration` is implemented the same way, as illustrated in the following sample.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-```
-
- Note that the default set of service behaviors are added to the service. This system allows endpoints to share common configurations without redefining the settings. If machine-wide scope is required, create the binding or behavior configuration in Machine.config. The configuration settings are available in all App.config files. The [Configuration Editor Tool (SvcConfigEditor.exe)](configuration-editor-tool-svcconfigeditor-exe.md) makes it easy to create configurations.
-
-## Behavior Merge
-
- The behavior merge feature makes it easier to manage behaviors when you want a set of common behaviors to be used consistently. This feature allows you to specify behaviors at different levels of the configuration hierarchy and have services inherit behaviors from multiple levels of the configuration hierarchy. To illustrate how this works assume you have the following virtual directory layout in IIS:
-
+ address="myAddress3" behaviorConfiguration="myBehavior"
+ binding="basicHttpBinding"
+ contract="MyContract" />
+
+
+
+
+```
+
+ Note that the default set of service behaviors are added to the service. This system allows endpoints to share common configurations without redefining the settings. If machine-wide scope is required, create the binding or behavior configuration in Machine.config. The configuration settings are available in all App.config files. The [Configuration Editor Tool (SvcConfigEditor.exe)](configuration-editor-tool-svcconfigeditor-exe.md) makes it easy to create configurations.
+
+## Behavior Merge
+
+ The behavior merge feature makes it easier to manage behaviors when you want a set of common behaviors to be used consistently. This feature allows you to specify behaviors at different levels of the configuration hierarchy and have services inherit behaviors from multiple levels of the configuration hierarchy. To illustrate how this works assume you have the following virtual directory layout in IIS:
+
`~\Web.config~\Service.svc~\Child\Web.config~\Child\Service.svc`
-
- And your `~\Web.config` file has the following contents:
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-```
-
- And you have a child Web.config located at ~\Child\Web.config with the following contents:
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-```
-
- The service located at ~\Child\Service.svc will behave as though it has both the serviceDebug and serviceMetadata behaviors. The service located at ~\Service.svc will only have the serviceDebug behavior. What happens is that the two behavior collections with the same name (in this case the empty string) are merged.
-
- You can also clear behavior collections by using the \ tag and removed individual behaviors from the collection by using the \ tag. For example, the following two configuration results in the child service having only the serviceMetadata behavior:
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
- Behavior merge is done for nameless behavior collections as shown above and named behavior collections as well.
-
- Behavior merge works in the IIS hosting environment, in which Web.config files merge hierarchically with the root Web.config file and machine.config. But it also works in the application environment, where machine.config can merge with the App.config file.
-
- Behavior merge applies to both endpoint behaviors and service behaviors in configuration.
-
- If a child behavior collection contains a behavior that’s already present in the parent behavior collection, the child behavior overrides the parent. So if a parent behavior collection had `` and a child behavior collection had ``, the child behavior would override the parent behavior in the behavior collection and httpGetEnabled would be "true".
-
+
+ And your `~\Web.config` file has the following contents:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ And you have a child Web.config located at ~\Child\Web.config with the following contents:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ The service located at ~\Child\Service.svc will behave as though it has both the serviceDebug and serviceMetadata behaviors. The service located at ~\Service.svc will only have the serviceDebug behavior. What happens is that the two behavior collections with the same name (in this case the empty string) are merged.
+
+ You can also clear behavior collections by using the \ tag and removed individual behaviors from the collection by using the \ tag. For example, the following two configuration results in the child service having only the serviceMetadata behavior:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ Behavior merge is done for nameless behavior collections as shown above and named behavior collections as well.
+
+ Behavior merge works in the IIS hosting environment, in which Web.config files merge hierarchically with the root Web.config file and machine.config. But it also works in the application environment, where machine.config can merge with the App.config file.
+
+ Behavior merge applies to both endpoint behaviors and service behaviors in configuration.
+
+ If a child behavior collection contains a behavior that’s already present in the parent behavior collection, the child behavior overrides the parent. So if a parent behavior collection had `` and a child behavior collection had ``, the child behavior would override the parent behavior in the behavior collection and httpGetEnabled would be "true".
+
## See also
- [Simplified Configuration](simplified-configuration.md)
diff --git a/docs/framework/wcf/configuring-wcf-services-in-code.md b/docs/framework/wcf/configuring-wcf-services-in-code.md
index 8f40b5bdccf89..5d0214035b74e 100644
--- a/docs/framework/wcf/configuring-wcf-services-in-code.md
+++ b/docs/framework/wcf/configuring-wcf-services-in-code.md
@@ -74,7 +74,7 @@ public class Service1 : IService1
}
```
- The settings in the <`protocolMappings`> section are only used if no application endpoints are added to the programmatically.You can optionally load the service configuration from the default application configuration file by calling and then change the settings. The class also allows you to load configuration from a centralized configuration. The following code illustrates how to implement this:
+ The settings in the `` section are only used if no application endpoints are added to the programmatically.You can optionally load the service configuration from the default application configuration file by calling and then change the settings. The class also allows you to load configuration from a centralized configuration. The following code illustrates how to implement this:
```csharp
public class Service1 : IService1
@@ -88,7 +88,7 @@ public class Service1 : IService1
```
> [!IMPORTANT]
-> Note that ignores <`host`> settings within the <`service`> tag of <`system.serviceModel`>. Conceptually, <`host`> is about host configuration, not service configuration, and it gets loaded before the Configure method executes.
+> Note that ignores `` settings within the `` tag of ``. Conceptually, `` is about host configuration, not service configuration, and it gets loaded before the Configure method executes.
## See also
diff --git a/docs/framework/wcf/extending/overriding-the-identity-of-a-service-for-authentication.md b/docs/framework/wcf/extending/overriding-the-identity-of-a-service-for-authentication.md
index 8c91ebee8fa4c..0e25e2690bf02 100644
--- a/docs/framework/wcf/extending/overriding-the-identity-of-a-service-for-authentication.md
+++ b/docs/framework/wcf/extending/overriding-the-identity-of-a-service-for-authentication.md
@@ -48,7 +48,7 @@ Typically, you do not have to set the identity on a service because the selectio
If you change the client credential type in the binding previously shown to `Certificate`, then the generated WSDL contains a Base64 serialized X.509 certificate for the identity value as shown in the following code. This is the default for all client credential types other than Windows.
- You can change the value of the default service identity or change the type of the identity by using the <`identity`> element in configuration or by setting the identity in code. The following configuration code sets a domain name system (DNS) identity with the value `contoso.com`.
+ You can change the value of the default service identity or change the type of the identity by using the `` element in configuration or by setting the identity in code. The following configuration code sets a domain name system (DNS) identity with the value `contoso.com`.
### Set Identity Programmatically
diff --git a/docs/framework/wcf/extending/specifying-a-custom-crypto-algorithm.md b/docs/framework/wcf/extending/specifying-a-custom-crypto-algorithm.md
index 8a73165920409..85d97f8c71e63 100644
--- a/docs/framework/wcf/extending/specifying-a-custom-crypto-algorithm.md
+++ b/docs/framework/wcf/extending/specifying-a-custom-crypto-algorithm.md
@@ -6,124 +6,124 @@ ms.topic: how-to
---
# Specifying a Custom Crypto Algorithm
-WCF allows you to specify a custom crypto algorithm to use when encrypting data or computing digital signatures. This is done by the following steps:
-
-1. Derive a class from
-
-2. Register the algorithm
-
-3. Configure the binding with the -derived class.
-
-## Derive a class from SecurityAlgorithmSuite
-
- The is an abstract base class that allows you to specify the algorithm to use when performing various security related operations. For example, computing a hash for a digital signature or encrypting a message. The following code shows how to derive a class from :
-
-```csharp
-public class MyCustomAlgorithmSuite : SecurityAlgorithmSuite
- {
- public override string DefaultAsymmetricKeyWrapAlgorithm
- {
- get { return SecurityAlgorithms.RsaOaepKeyWrap; }
- }
-
- public override string DefaultAsymmetricSignatureAlgorithm
- {
- get { return SecurityAlgorithms.RsaSha1Signature; }
- }
-
- public override string DefaultCanonicalizationAlgorithm
- {
- get { return SecurityAlgorithms.ExclusiveC14n; ; }
- }
-
- public override string DefaultDigestAlgorithm
- {
- get { return SecurityAlgorithms.MyCustomHashAlgorithm; }
- }
-
- public override string DefaultEncryptionAlgorithm
- {
- get { return SecurityAlgorithms.Aes128Encryption; }
- }
-
- public override int DefaultEncryptionKeyDerivationLength
- {
- get { return 128; }
- }
-
- public override int DefaultSignatureKeyDerivationLength
- {
- get { return 128; }
- }
-
- public override int DefaultSymmetricKeyLength
- {
- get { return 128; }
- }
-
- public override string DefaultSymmetricKeyWrapAlgorithm
- {
- get { return SecurityAlgorithms.Aes128Encryption; }
- }
-
- public override string DefaultSymmetricSignatureAlgorithm
- {
- get { return SecurityAlgorithms.HmacSha1Signature; }
- }
-
- public override bool IsAsymmetricKeyLengthSupported(int length)
- {
- return length >= 1024 && length <= 4096;
- }
-
- public override bool IsSymmetricKeyLengthSupported(int length)
- {
- return length >= 128 && length <= 256;
- }
- }
-```
-
-## Register the Custom Algorithm
-
- Registration can be done in a configuration file or in imperative code. Registering a custom algorithm is done by creating a mapping between a class that implements a crypto service provider and an alias. The alias is then mapped to a URI which is used when specifying the algorithm in the WCF service's binding. The following configuration snippet illustrates how to register a custom algorithm in config:
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
- The section under the <`cryptoClasses`> element creates the mapping between the SHA256CryptoServiceProvider and the alias "SHA256CSP". The <`nameEntry`> element creates the mapping between the "SHA256CSP" alias and the specified URL `http://contoso.com/CustomAlgorithms/CustomHashAlgorithm`.
-
- To register the custom algorithm in code use the method. This method creates both mappings. The following example shows how to call this method:
-
+WCF allows you to specify a custom crypto algorithm to use when encrypting data or computing digital signatures. This is done by the following steps:
+
+1. Derive a class from
+
+2. Register the algorithm
+
+3. Configure the binding with the -derived class.
+
+## Derive a class from SecurityAlgorithmSuite
+
+ The is an abstract base class that allows you to specify the algorithm to use when performing various security related operations. For example, computing a hash for a digital signature or encrypting a message. The following code shows how to derive a class from :
+
+```csharp
+public class MyCustomAlgorithmSuite : SecurityAlgorithmSuite
+ {
+ public override string DefaultAsymmetricKeyWrapAlgorithm
+ {
+ get { return SecurityAlgorithms.RsaOaepKeyWrap; }
+ }
+
+ public override string DefaultAsymmetricSignatureAlgorithm
+ {
+ get { return SecurityAlgorithms.RsaSha1Signature; }
+ }
+
+ public override string DefaultCanonicalizationAlgorithm
+ {
+ get { return SecurityAlgorithms.ExclusiveC14n; ; }
+ }
+
+ public override string DefaultDigestAlgorithm
+ {
+ get { return SecurityAlgorithms.MyCustomHashAlgorithm; }
+ }
+
+ public override string DefaultEncryptionAlgorithm
+ {
+ get { return SecurityAlgorithms.Aes128Encryption; }
+ }
+
+ public override int DefaultEncryptionKeyDerivationLength
+ {
+ get { return 128; }
+ }
+
+ public override int DefaultSignatureKeyDerivationLength
+ {
+ get { return 128; }
+ }
+
+ public override int DefaultSymmetricKeyLength
+ {
+ get { return 128; }
+ }
+
+ public override string DefaultSymmetricKeyWrapAlgorithm
+ {
+ get { return SecurityAlgorithms.Aes128Encryption; }
+ }
+
+ public override string DefaultSymmetricSignatureAlgorithm
+ {
+ get { return SecurityAlgorithms.HmacSha1Signature; }
+ }
+
+ public override bool IsAsymmetricKeyLengthSupported(int length)
+ {
+ return length >= 1024 && length <= 4096;
+ }
+
+ public override bool IsSymmetricKeyLengthSupported(int length)
+ {
+ return length >= 128 && length <= 256;
+ }
+ }
+```
+
+## Register the Custom Algorithm
+
+ Registration can be done in a configuration file or in imperative code. Registering a custom algorithm is done by creating a mapping between a class that implements a crypto service provider and an alias. The alias is then mapped to a URI which is used when specifying the algorithm in the WCF service's binding. The following configuration snippet illustrates how to register a custom algorithm in config:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ The section under the `` element creates the mapping between the SHA256CryptoServiceProvider and the alias "SHA256CSP". The `` element creates the mapping between the "SHA256CSP" alias and the specified URL `http://contoso.com/CustomAlgorithms/CustomHashAlgorithm`.
+
+ To register the custom algorithm in code use the method. This method creates both mappings. The following example shows how to call this method:
+
```csharp
// Register the custom URI string defined for the hashAlgorithm in MyCustomAlgorithmSuite class to create the
-// SHA256CryptoServiceProvider hash algorithm object.
-CryptoConfig.AddAlgorithm(typeof(SHA256CryptoServiceProvider), "http://contoso.com/CustomAlgorithms/CustomHashAlgorithm");
-```
-
-## Configure the Binding
-
- You configure the binding by specifying the custom -derived class in the binding settings as shown in the following code snippet:
-
-```csharp
-WSHttpBinding binding = new WSHttpBinding();
- binding.Security.Message.AlgorithmSuite = new MyCustomAlgorithmSuite();
-```
-
- For a complete code example, see the [Cryptographic Agility in WCF Security](../samples/cryptographic-agility-in-wcf-security.md) sample.
-
+// SHA256CryptoServiceProvider hash algorithm object.
+CryptoConfig.AddAlgorithm(typeof(SHA256CryptoServiceProvider), "http://contoso.com/CustomAlgorithms/CustomHashAlgorithm");
+```
+
+## Configure the Binding
+
+ You configure the binding by specifying the custom -derived class in the binding settings as shown in the following code snippet:
+
+```csharp
+WSHttpBinding binding = new WSHttpBinding();
+ binding.Security.Message.AlgorithmSuite = new MyCustomAlgorithmSuite();
+```
+
+ For a complete code example, see the [Cryptographic Agility in WCF Security](../samples/cryptographic-agility-in-wcf-security.md) sample.
+
## See also
- [Securing Services and Clients](../feature-details/securing-services-and-clients.md)
diff --git a/docs/framework/wcf/extending/walkthrough-creating-custom-client-and-service-credentials.md b/docs/framework/wcf/extending/walkthrough-creating-custom-client-and-service-credentials.md
index 50934b00997ac..892f6ff899e55 100644
--- a/docs/framework/wcf/extending/walkthrough-creating-custom-client-and-service-credentials.md
+++ b/docs/framework/wcf/extending/walkthrough-creating-custom-client-and-service-credentials.md
@@ -108,9 +108,9 @@ Once you have the configuration handler class, it can be integrated into the WCF
#### To register and use a custom client credentials configuration handler in the application configuration
-1. Add an <`extensions`> element and a <`behaviorExtensions`> element to the configuration file.
+1. Add an `` element and a `` element to the configuration file.
-2. Add an <`add`> element to the <`behaviorExtensions`> element and set the `name` attribute to an appropriate value.
+2. Add an `` element to the `` element and set the `name` attribute to an appropriate value.
3. Set the `type` attribute to the fully-qualified type name. Also include the assembly name and other assembly attributes.
@@ -124,7 +124,7 @@ Once you have the configuration handler class, it can be integrated into the WCF
```
-4. After registering your configuration handler, the custom credentials element can be used inside the same configuration file instead of the system-provided <`clientCredentials`> element. You can use both the system-provided properties and any new properties that you have added to your configuration handler implementation. The following example sets the value of a custom property using the `creditCardNumber` attribute.
+4. After registering your configuration handler, the custom credentials element can be used inside the same configuration file instead of the system-provided `` element. You can use both the system-provided properties and any new properties that you have added to your configuration handler implementation. The following example sets the value of a custom property using the `creditCardNumber` attribute.
```xml
diff --git a/docs/framework/wcf/feature-details/config-workflow-unhandled-exception-workflowservicehost.md b/docs/framework/wcf/feature-details/config-workflow-unhandled-exception-workflowservicehost.md
index 0bddfdf3f18e1..c23ebb7534fe3 100644
--- a/docs/framework/wcf/feature-details/config-workflow-unhandled-exception-workflowservicehost.md
+++ b/docs/framework/wcf/feature-details/config-workflow-unhandled-exception-workflowservicehost.md
@@ -7,47 +7,47 @@ ms.assetid: 51b25c86-292c-43e4-8d13-273d2badc8ad
---
# How to: Configure Workflow Unhandled Exception Behavior with WorkflowServiceHost
-The is a behavior that enables you to specify the action to take if an unhandled exception occurs within a workflow hosted in . This topic shows how to configure this behavior in a configuration file.
-
-### To configure WorkflowUnhandledExceptionBehavior
-
-1. Add a <`workflowUnhandledException`> element in a <`behavior`> element within a <`serviceBehaviors`> element, using the `action` attribute to specify the action to take when an unhandled exception occurs as shown in the following example.
-
- ```xml
-
-
-
+The is a behavior that enables you to specify the action to take if an unhandled exception occurs within a workflow hosted in . This topic shows how to configure this behavior in a configuration file.
+
+### To configure WorkflowUnhandledExceptionBehavior
+
+1. Add a `` element in a `` element within a `` element, using the `action` attribute to specify the action to take when an unhandled exception occurs as shown in the following example.
+
+ ```xml
+
+
+
-
-
-
- ```
-
+
+
+
+ ```
+
> [!NOTE]
- > The preceding configuration sample is using simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md).
-
- This behavior can be configured in code as shown in the following example.
-
- ```csharp
- host.Description.Behaviors.Add(new WorkflowUnhandledExceptionBehavior { Action = WorkflowUnhandledExceptionAction.AbandonAndSuspend });
- ```
-
- The `action` attribute of the <`workflowUnhandledException`> element can be set to one of the following values:
-
- **abandon**
- Aborts the instance in memory without touching the persisted instance state (that is, roll back to the last persist point).
-
- **abandonAndSuspend**
- Aborts the instance in memory and updates the persisted instance to be suspended.
-
- **cancel**
- Calls cancellation handlers for the instance and then completes the instance in memory, which may also remove it from the instance store
-
- **terminate**
- Completes the instance in memory and removes it from the instance store.
-
- For more information about , see [Workflow Service Host Extensibility](workflow-service-host-extensibility.md).
-
+ > The preceding configuration sample is using simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md).
+
+ This behavior can be configured in code as shown in the following example.
+
+ ```csharp
+ host.Description.Behaviors.Add(new WorkflowUnhandledExceptionBehavior { Action = WorkflowUnhandledExceptionAction.AbandonAndSuspend });
+ ```
+
+ The `action` attribute of the `` element can be set to one of the following values:
+
+ **abandon**
+ Aborts the instance in memory without touching the persisted instance state (that is, roll back to the last persist point).
+
+ **abandonAndSuspend**
+ Aborts the instance in memory and updates the persisted instance to be suspended.
+
+ **cancel**
+ Calls cancellation handlers for the instance and then completes the instance in memory, which may also remove it from the instance store
+
+ **terminate**
+ Completes the instance in memory and removes it from the instance store.
+
+ For more information about , see [Workflow Service Host Extensibility](workflow-service-host-extensibility.md).
+
## See also
- [Workflow Service Host Extensibility](workflow-service-host-extensibility.md)
diff --git a/docs/framework/wcf/feature-details/configuration-based-activation-in-iis-and-was.md b/docs/framework/wcf/feature-details/configuration-based-activation-in-iis-and-was.md
index 83fd726e0174b..d6a7a028c03b0 100644
--- a/docs/framework/wcf/feature-details/configuration-based-activation-in-iis-and-was.md
+++ b/docs/framework/wcf/feature-details/configuration-based-activation-in-iis-and-was.md
@@ -10,10 +10,10 @@ Normally when hosting a Windows Communication Foundation (WCF) service under Int
## Configuration-Based Activation
-Configuration-based activation takes the metadata that used to be placed in the .svc file and places it in the Web.config file. Within the<`serviceHostingEnvironment`> element there is a <`serviceActivations`> element. Within the <`serviceActivations`> element are one or more <`add`> elements, one for each hosted service. The <`add`> element contains attributes that let you set the relative address for the service and the service type or a service host factory. The following configuration example code shows how this section is used.
+Configuration-based activation takes the metadata that used to be placed in the .svc file and places it in the Web.config file. Within the`` element there is a `` element. Within the `` element are one or more `` elements, one for each hosted service. The `` element contains attributes that let you set the relative address for the service and the service type or a service host factory. The following configuration example code shows how this section is used.
> [!NOTE]
-> Each <`add`> element must specify a service or a factory attribute. Specifying both service and factory attributes is allowed.
+> Each `` element must specify a service or a factory attribute. Specifying both service and factory attributes is allowed.
```xml
diff --git a/docs/framework/wcf/feature-details/configuring-discovery-in-a-configuration-file.md b/docs/framework/wcf/feature-details/configuring-discovery-in-a-configuration-file.md
index b3ad61a3f70be..7f9a9e476af68 100644
--- a/docs/framework/wcf/feature-details/configuring-discovery-in-a-configuration-file.md
+++ b/docs/framework/wcf/feature-details/configuring-discovery-in-a-configuration-file.md
@@ -6,273 +6,273 @@ ms.topic: how-to
---
# Configuring Discovery in a Configuration File
-There are four major groups of configuration settings used in discovery. This topic will briefly describe each and show examples of how to configure them. Following each section will be a link to more in-depth documentation about each area.
-
-## Behavior Configuration
-
- Discovery uses service behaviors and endpoint behaviors. The behavior enables discovery for all of a service's endpoints and allows you to specify announcement endpoints. The following example shows how to add the and specify an announcement endpoint.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-```
-
- Once you specify the behavior, reference it from a <`service`> element as shown in the following sample.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-```
-
- In order for a service to be discoverable, you must also add a discovery endpoint, the example above adds a standard endpoint.
-
- When you add announcement endpoints you must also add an announcement listener service to the <`services`> element as shown in the following example.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
+There are four major groups of configuration settings used in discovery. This topic will briefly describe each and show examples of how to configure them. Following each section will be a link to more in-depth documentation about each area.
+
+## Behavior Configuration
+
+ Discovery uses service behaviors and endpoint behaviors. The behavior enables discovery for all of a service's endpoints and allows you to specify announcement endpoints. The following example shows how to add the and specify an announcement endpoint.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ Once you specify the behavior, reference it from a `` element as shown in the following sample.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+```
+
+ In order for a service to be discoverable, you must also add a discovery endpoint, the example above adds a standard endpoint.
+
+ When you add announcement endpoints you must also add an announcement listener service to the `` element as shown in the following example.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
-```
-
- The behavior is used to enable or disable discovery of a specific endpoint. The following example configures a service with two application endpoints, one with discovery enabled and one with discovery disabled. For each endpoint an behavior is added.
-
-```xml
-
-
-
-
-
- behavior is used to enable or disable discovery of a specific endpoint. The following example configures a service with two application endpoints, one with discovery enabled and one with discovery disabled. For each endpoint an behavior is added.
+
+```xml
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
- The behavior can also be used to add custom metadata to the endpoint metadata returned by the service. The following example shows how to do this.
-
-```xml
-
-
-
- This is custom metadata.
- i:PrintBasic
-
- This is a nested custom metadata.
-
-
-
-
-```
-
- The behavior can also be used to add scopes and types that clients use to search for services. The following example shows how to do this in a client side configuration file.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
- For more information about and see [WCF Discovery Overview](wcf-discovery-overview.md).
-
-## Binding Element Configuration
-
- Binding element configuration is most interesting on the client side. You can use configuration to specify the find criteria used to discover services from a WCF client application. The following example creates a custom binding with the channel and specifies find criteria that includes a type and scope. In addition it specifies values for the and properties.
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
+ behaviorConfiguration="ep0Behavior" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ The behavior can also be used to add custom metadata to the endpoint metadata returned by the service. The following example shows how to do this.
+
+```xml
+
+
+
+ This is custom metadata.
+ i:PrintBasic
+
+ This is a nested custom metadata.
+
+
+
+
+```
+
+ The behavior can also be used to add scopes and types that clients use to search for services. The following example shows how to do this in a client side configuration file.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+ For more information about and see [WCF Discovery Overview](wcf-discovery-overview.md).
+
+## Binding Element Configuration
+
+ Binding element configuration is most interesting on the client side. You can use configuration to specify the find criteria used to discover services from a WCF client application. The following example creates a custom binding with the channel and specifies find criteria that includes a type and scope. In addition it specifies values for the and properties.
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-```
-
- This custom binding configuration must be referenced by a client endpoint:
-
-```xml
-
-
-
-```
-
- For more information about find criteria see [Discovery Find and FindCriteria](discovery-find-and-findcriteria.md). For more information about discovery and binding elements see, [WCF Discovery Overview](wcf-discovery-overview.md)
-
-## Standard Endpoint Configuration
-
- Standard endpoints are predefined endpoints that have default values for one or more properties (address, binding, or contract) or one or more property values that cannot change. .NET 4 ships with 3 discovery related standard endpoints: , , and . The is a standard endpoint that is pre-configured for discovery operations over a UDP multicast binding. The is a standard endpoint that is pre-configured to send announcement messages over a UDP binding. The is a standard endpoint that uses discovery to find the endpoint address of a discovered service dynamically at run time. Standard bindings are specified with an <`endpoint`> element that contains kind attribute that specified the type of standard endpoint to add. The following example shows how to add a and a .
-
-```xml
-
-
+
+```
+
+ This custom binding configuration must be referenced by a client endpoint:
+
+```xml
+
+
+
+```
+
+ For more information about find criteria see [Discovery Find and FindCriteria](discovery-find-and-findcriteria.md). For more information about discovery and binding elements see, [WCF Discovery Overview](wcf-discovery-overview.md)
+
+## Standard Endpoint Configuration
+
+ Standard endpoints are predefined endpoints that have default values for one or more properties (address, binding, or contract) or one or more property values that cannot change. .NET 4 ships with 3 discovery related standard endpoints: , , and . The is a standard endpoint that is pre-configured for discovery operations over a UDP multicast binding. The is a standard endpoint that is pre-configured to send announcement messages over a UDP binding. The is a standard endpoint that uses discovery to find the endpoint address of a discovered service dynamically at run time. Standard bindings are specified with an `` element that contains kind attribute that specified the type of standard endpoint to add. The following example shows how to add a and a .
+
+```xml
+
+
-
-
-
-
-
-
-```
-
- Standard endpoints are configured in a <`standardEndpoints`> element. The following example shows how to configure the and the .
-
-```xml
-
-
+
+
+
+
+
+
+```
+
+ Standard endpoints are configured in a `` element. The following example shows how to configure the and the .
+
+```xml
+
+
-
-
-
-
-
-
-
+ maxAnnouncementDelay="00:00:00.800">
+
+
+
+
+
+
+
-```
-
- Once you've added the standard endpoint configuration, reference the configuration in the <`endpoint`> element for each endpoint as shown in the following sample.
-
-```xml
-
-
+```
+
+ Once you've added the standard endpoint configuration, reference the configuration in the `` element for each endpoint as shown in the following sample.
+
+```xml
+
+
-
-
-
-
-
-
-```
-
- Unlike the other standard endpoints used in discovery, you specify a binding and contract for . The following example shows how to add and configure a .
-
-```xml
-
-
-
+
+
+
+
+
+
+```
+
+ Unlike the other standard endpoints used in discovery, you specify a binding and contract for . The following example shows how to add and configure a .
+
+```xml
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
This is custom metadata.
-
-
-
-
-
-
-
-```
-
+
+
+
+
+
+
+
+```
+
For more information about standard endpoints see [Standard Endpoints](standard-endpoints.md).
diff --git a/docs/framework/wcf/feature-details/hosting-workflow-services.md b/docs/framework/wcf/feature-details/hosting-workflow-services.md
index 963b6c76dcbae..b39147516ad38 100644
--- a/docs/framework/wcf/feature-details/hosting-workflow-services.md
+++ b/docs/framework/wcf/feature-details/hosting-workflow-services.md
@@ -40,7 +40,7 @@ A workflow service must be hosted for it to respond to incoming messages. Workfl
- Place an assembly in the IIS/WAS virtual directory that contains an activity that uses the WCF messaging activities.
- A .xamlx file that defines a workflow service must contain a <`Service`> root element or a root element that contains any type derived from . When using the Visual Studio activity template, a .xamlx file is created. When using the WCF Workflow Service template, a .xamlx file is created.
+ A .xamlx file that defines a workflow service must contain a `` root element or a root element that contains any type derived from . When using the Visual Studio activity template, a .xamlx file is created. When using the WCF Workflow Service template, a .xamlx file is created.
## Hosting Workflow Services under Windows Server App Fabric
@@ -48,7 +48,7 @@ A workflow service must be hosted for it to respond to incoming messages. Workfl
## Referencing Custom Activities
- References to custom activities must be added to the <`Assemblies`> section under <`System.Web.Compilation`> so that they are loaded into the Application Domain and the XAML deserializer is able to locate the types. These settings can be made at the application level or in the root Web.config if the settings should be applied to all applications on the machine.
+ References to custom activities must be added to the `` section under `` so that they are loaded into the Application Domain and the XAML deserializer is able to locate the types. These settings can be made at the application level or in the root Web.config if the settings should be applied to all applications on the machine.
## Deployment
diff --git a/docs/framework/wcf/feature-details/how-to-call-wcf-service-operations-asynchronously.md b/docs/framework/wcf/feature-details/how-to-call-wcf-service-operations-asynchronously.md
index 4bc92835d30ae..e2823cf285a0b 100644
--- a/docs/framework/wcf/feature-details/how-to-call-wcf-service-operations-asynchronously.md
+++ b/docs/framework/wcf/feature-details/how-to-call-wcf-service-operations-asynchronously.md
@@ -2,63 +2,63 @@
title: "How to: Call WCF Service Operations Asynchronously"
description: Learn how to create a WCF client that can access a service operation asynchronously by using the event-driven asynchronous calling model.
ms.date: "03/30/2017"
-dev_langs:
+dev_langs:
- "csharp"
- "vb"
ms.assetid: 0face17f-43ca-417b-9b33-737c0fc360df
---
# How to: Call WCF Service Operations Asynchronously
-This article covers how a client can access a service operation asynchronously. The service in this article implements the `ICalculator` interface. The client can call the operations on this interface asynchronously by using the event-driven asynchronous calling model. (For more information about the event-based asynchronous calling model, see [Multithreaded Programming with the Event-based Asynchronous Pattern](../../../standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-eap.md)). For an example that shows how to implement an operation asynchronously in a service, see [How to: Implement an Asynchronous Service Operation](../how-to-implement-an-asynchronous-service-operation.md). For more information about synchronous and asynchronous operations, see [Synchronous and Asynchronous Operations](../synchronous-and-asynchronous-operations.md).
-
+This article covers how a client can access a service operation asynchronously. The service in this article implements the `ICalculator` interface. The client can call the operations on this interface asynchronously by using the event-driven asynchronous calling model. (For more information about the event-based asynchronous calling model, see [Multithreaded Programming with the Event-based Asynchronous Pattern](../../../standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-eap.md)). For an example that shows how to implement an operation asynchronously in a service, see [How to: Implement an Asynchronous Service Operation](../how-to-implement-an-asynchronous-service-operation.md). For more information about synchronous and asynchronous operations, see [Synchronous and Asynchronous Operations](../synchronous-and-asynchronous-operations.md).
+
> [!NOTE]
-> The event-driven asynchronous calling model is not supported when using a . For information about making asynchronous calls using the , see [How to: Call Operations Asynchronously Using a Channel Factory](how-to-call-operations-asynchronously-using-a-channel-factory.md).
-
-## Procedure
-
-#### To call WCF service operations asynchronously
-
-1. Run the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) tool with both the `/async` and the `/tcv:Version35` command options together as shown in the following command.
-
+> The event-driven asynchronous calling model is not supported when using a . For information about making asynchronous calls using the , see [How to: Call Operations Asynchronously Using a Channel Factory](how-to-call-operations-asynchronously-using-a-channel-factory.md).
+
+## Procedure
+
+#### To call WCF service operations asynchronously
+
+1. Run the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) tool with both the `/async` and the `/tcv:Version35` command options together as shown in the following command.
+
```console
- svcutil /n:http://Microsoft.ServiceModel.Samples,Microsoft.ServiceModel.Samples http://localhost:8000/servicemodelsamples/service/mex /a /tcv:Version35
- ```
-
- This generates, in addition to the synchronous and standard delegate-based asynchronous operations, a WCF client class that contains:
-
- - Two <`operationName`>`Async` operations for use with the event-based asynchronous calling approach. For example:
-
+ svcutil /n:http://Microsoft.ServiceModel.Samples,Microsoft.ServiceModel.Samples http://localhost:8000/servicemodelsamples/service/mex /a /tcv:Version35
+ ```
+
+ This generates, in addition to the synchronous and standard delegate-based asynchronous operations, a WCF client class that contains:
+
+ - Two ```Async` operations for use with the event-based asynchronous calling approach. For example:
+
[!code-csharp[EventAsync#1](../../../../samples/snippets/csharp/VS_Snippets_CFX/eventasync/cs/generatedclient.cs#1)]
- [!code-vb[EventAsync#1](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/generatedclient.vb#1)]
-
- - Operation completed events of the form <`operationName`>`Completed` for use with the event-based asynchronous calling approach. For example:
-
+ [!code-vb[EventAsync#1](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/generatedclient.vb#1)]
+
+ - Operation completed events of the form ```Completed` for use with the event-based asynchronous calling approach. For example:
+
[!code-csharp[EventAsync#2](../../../../samples/snippets/csharp/VS_Snippets_CFX/eventasync/cs/generatedclient.cs#2)]
- [!code-vb[EventAsync#2](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/generatedclient.vb#2)]
-
- - types for each operation (of the form <`operationName`>`CompletedEventArgs`) for use with the event-based asynchronous calling approach. For example:
-
+ [!code-vb[EventAsync#2](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/generatedclient.vb#2)]
+
+ - types for each operation (of the form ```CompletedEventArgs`) for use with the event-based asynchronous calling approach. For example:
+
[!code-csharp[EventAsync#3](../../../../samples/snippets/csharp/VS_Snippets_CFX/eventasync/cs/generatedclient.cs#3)]
- [!code-vb[EventAsync#3](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/generatedclient.vb#3)]
-
-2. In the calling application, create a callback method to be called when the asynchronous operation is complete, as shown in the following sample code.
-
+ [!code-vb[EventAsync#3](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/generatedclient.vb#3)]
+
+2. In the calling application, create a callback method to be called when the asynchronous operation is complete, as shown in the following sample code.
+
[!code-csharp[EventAsync#4](../../../../samples/snippets/csharp/VS_Snippets_CFX/eventasync/cs/client.cs#4)]
- [!code-vb[EventAsync#4](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/client.vb#4)]
-
-3. Prior to calling the operation, use a new generic of type <`operationName`>`EventArgs` to add the handler method (created in the preceding step) to the <`operationName`>`Completed` event. Then call the <`operationName`>`Async` method. For example:
-
+ [!code-vb[EventAsync#4](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/client.vb#4)]
+
+3. Prior to calling the operation, use a new generic of type ```EventArgs` to add the handler method (created in the preceding step) to the ```Completed` event. Then call the ```Async` method. For example:
+
[!code-csharp[EventAsync#5](../../../../samples/snippets/csharp/VS_Snippets_CFX/eventasync/cs/client.cs#5)]
- [!code-vb[EventAsync#5](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/client.vb#5)]
-
-## Example
-
+ [!code-vb[EventAsync#5](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/client.vb#5)]
+
+## Example
+
> [!NOTE]
-> The design guidelines for the event-based asynchronous model state that if more than one value is returned, one value is returned as the `Result` property and the others are returned as properties on the object. One result of this is that if a client imports metadata using the event-based asynchronous command options and the operation returns more than one value, the default object returns one value as the `Result` property and the remainder are properties of the object.If you want to receive the message object as the `Result` property and have the returned values as properties on that object, use the `/messageContract` command option. This generates a signature that returns the response message as the `Result` property on the object. All internal return values are then properties of the response message object.
-
+> The design guidelines for the event-based asynchronous model state that if more than one value is returned, one value is returned as the `Result` property and the others are returned as properties on the object. One result of this is that if a client imports metadata using the event-based asynchronous command options and the operation returns more than one value, the default object returns one value as the `Result` property and the remainder are properties of the object.If you want to receive the message object as the `Result` property and have the returned values as properties on that object, use the `/messageContract` command option. This generates a signature that returns the response message as the `Result` property on the object. All internal return values are then properties of the response message object.
+
[!code-csharp[EventAsync#6](../../../../samples/snippets/csharp/VS_Snippets_CFX/eventasync/cs/client.cs#6)]
- [!code-vb[EventAsync#6](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/client.vb#6)]
-
+ [!code-vb[EventAsync#6](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/eventasync/vb/client.vb#6)]
+
## See also
- [How to: Implement an Asynchronous Service Operation](../how-to-implement-an-asynchronous-service-operation.md)
diff --git a/docs/framework/wcf/feature-details/how-to-configure-a-local-issuer.md b/docs/framework/wcf/feature-details/how-to-configure-a-local-issuer.md
index d566d96d05fc9..c84c412e661b7 100644
--- a/docs/framework/wcf/feature-details/how-to-configure-a-local-issuer.md
+++ b/docs/framework/wcf/feature-details/how-to-configure-a-local-issuer.md
@@ -63,9 +63,9 @@ Windows Communication Foundation (WCF) uses a local issuer in cases where the is
3. Set the `binding` and `bindingConfiguration` attributes to values that reference the appropriate binding to use when communicating with the local issuer endpoint.
-4. Optional. Set the [\](../../configure-apps/file-schema/wcf/identity.md) element as a child of the <`localIssuer`> element and specify identity information for the local issuer.
+4. Optional. Set the [\](../../configure-apps/file-schema/wcf/identity.md) element as a child of the `` element and specify identity information for the local issuer.
-5. Optional. Set the [\](../../configure-apps/file-schema/wcf/headers.md) element as a child of the <`localIssuer`> element and specify additional headers that are required in order to correctly address the local issuer.
+5. Optional. Set the [\](../../configure-apps/file-schema/wcf/headers.md) element as a child of the `` element and specify additional headers that are required in order to correctly address the local issuer.
## .NET Framework Security
diff --git a/docs/framework/wcf/feature-details/how-to-configure-credentials-on-a-federation-service.md b/docs/framework/wcf/feature-details/how-to-configure-credentials-on-a-federation-service.md
index cfb884509e51e..b526dc1523fb7 100644
--- a/docs/framework/wcf/feature-details/how-to-configure-credentials-on-a-federation-service.md
+++ b/docs/framework/wcf/feature-details/how-to-configure-credentials-on-a-federation-service.md
@@ -2,72 +2,72 @@
description: "Learn more about: How to: Configure Credentials on a Federation Service"
title: "How to: Configure Credentials on a Federation Service"
ms.date: "03/30/2017"
-dev_langs:
+dev_langs:
- "csharp"
- "vb"
-helpviewer_keywords:
+helpviewer_keywords:
- "WCF, federation"
- "federation"
ms.assetid: 149ab165-0ef3-490a-83a9-4322a07bd98a
---
# How to: Configure Credentials on a Federation Service
-In Windows Communication Foundation (WCF), creating a federated service consists of the following main procedures:
-
-1. Configuring a or similar custom binding. For more information about creating an appropriate binding, see [How to: Create a WSFederationHttpBinding](how-to-create-a-wsfederationhttpbinding.md).
-
-2. Configuring the that controls how issued tokens presented to the service are authenticated.
-
- This topic provides details about the second step. For more information about how a federated service works, see [Federation](federation.md).
-
-### To set the properties of IssuedTokenServiceCredential in code
-
-1. Use the property of the class to return a reference to an instance. The property is accessed from the property of the class.
-
-2. Set the property to `true` if self-issued tokens such as CardSpace cards are to be authenticated. The default is `false`.
-
-3. Populate the collection returned by the property with instances of the class. Each instance represents an issuer from which the service will authenticate tokens.
-
+In Windows Communication Foundation (WCF), creating a federated service consists of the following main procedures:
+
+1. Configuring a or similar custom binding. For more information about creating an appropriate binding, see [How to: Create a WSFederationHttpBinding](how-to-create-a-wsfederationhttpbinding.md).
+
+2. Configuring the that controls how issued tokens presented to the service are authenticated.
+
+ This topic provides details about the second step. For more information about how a federated service works, see [Federation](federation.md).
+
+### To set the properties of IssuedTokenServiceCredential in code
+
+1. Use the property of the class to return a reference to an instance. The property is accessed from the property of the class.
+
+2. Set the property to `true` if self-issued tokens such as CardSpace cards are to be authenticated. The default is `false`.
+
+3. Populate the collection returned by the property with instances of the class. Each instance represents an issuer from which the service will authenticate tokens.
+
> [!NOTE]
- > Unlike the client-side collection returned by the property, the known certificates collection is not a keyed collection. The service accepts the tokens that the specified certificates issue regardless of the address of the client that sent the message containing the issued token (subject to the further constraints, which are described later in this topic).
-
-4. Set the property to one of the enumeration values. This can be done only in code. The default is .
-
-5. If the property is set to , then assign an instance of the custom class to the property.
-
-6. If the is set to `ChainTrust` or `PeerOrChainTrust`, set the property to an appropriate value from the enumeration. Note that the revocation mode is not used in `PeerTrust` or `Custom` validation modes.
-
-7. If needed, assign an instance of a custom class to the property. A custom Security Assertions Markup Language (SAML) serializer is needed, for example, for parsing custom SAML assertions.
-
-### To set the properties of IssuedTokenServiceCredential in configuration
-
-1. Create an `` element as a child of a <`serviceCredentials`> element.
-
-2. Set the `allowUntrustedRsaIssuers` attribute of the `` element to `true` if authenticating a self-issued token, such as a CardSpace card.
-
-3. Create a `` element as a child of the `` element.
-
-4. Create zero or more `` elements as children of the `` element, and specify how to locate the certificate using the `storeLocation`, `storeName`, `x509FindType`, and `findValue` attributes.
-
-5. If necessary, set the `samlSerializer` attribute of the <`issuedTokenAuthentication`> element to the type name of the custom class.
-
-## Example
-
- The following example sets the properties of an in code.
-
+ > Unlike the client-side collection returned by the property, the known certificates collection is not a keyed collection. The service accepts the tokens that the specified certificates issue regardless of the address of the client that sent the message containing the issued token (subject to the further constraints, which are described later in this topic).
+
+4. Set the property to one of the enumeration values. This can be done only in code. The default is .
+
+5. If the property is set to , then assign an instance of the custom class to the property.
+
+6. If the is set to `ChainTrust` or `PeerOrChainTrust`, set the property to an appropriate value from the enumeration. Note that the revocation mode is not used in `PeerTrust` or `Custom` validation modes.
+
+7. If needed, assign an instance of a custom class to the property. A custom Security Assertions Markup Language (SAML) serializer is needed, for example, for parsing custom SAML assertions.
+
+### To set the properties of IssuedTokenServiceCredential in configuration
+
+1. Create an `` element as a child of a `` element.
+
+2. Set the `allowUntrustedRsaIssuers` attribute of the `` element to `true` if authenticating a self-issued token, such as a CardSpace card.
+
+3. Create a `` element as a child of the `` element.
+
+4. Create zero or more `` elements as children of the `` element, and specify how to locate the certificate using the `storeLocation`, `storeName`, `x509FindType`, and `findValue` attributes.
+
+5. If necessary, set the `samlSerializer` attribute of the `` element to the type name of the custom class.
+
+## Example
+
+ The following example sets the properties of an in code.
+
[!code-csharp[C_FederatedService#2](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_federatedservice/cs/source.cs#2)]
- [!code-vb[C_FederatedService#2](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)]
-
- In order for a federated service to authenticate a client, the following must be true about the issued token:
-
-- When the issued token’s digital signature uses an RSA security key identifier, the property must be `true`.
-
-- When the issued token’s signature uses an X.509 issuer serial number, X.509 subject key identifier, or X.509 thumbprint security identifier, the issued token must be signed by a certificate in the collection returned by the property of the class.
-
-- When the issued token is signed using an X.509 certificate, the certificate must validate per the semantics specified by the value of the property, regardless of whether the certificate was sent to the relying party as a or was obtained from the property. For more information about X.509 certificate validation, see [Working with Certificates](working-with-certificates.md).
-
- For example, setting the to would authenticate any issued token whose signing certificate is in the `TrustedPeople` certificate store. In that case, set the property to either or . You can select other modes, including . When `Custom` is selected, you must assign an instance of the class to the property. The custom validator can validate certificates using any criteria it likes. For more information, see [How to: Create a Service that Employs a Custom Certificate Validator](../extending/how-to-create-a-service-that-employs-a-custom-certificate-validator.md).
-
+ [!code-vb[C_FederatedService#2](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_federatedservice/vb/source.vb#2)]
+
+ In order for a federated service to authenticate a client, the following must be true about the issued token:
+
+- When the issued token’s digital signature uses an RSA security key identifier, the property must be `true`.
+
+- When the issued token’s signature uses an X.509 issuer serial number, X.509 subject key identifier, or X.509 thumbprint security identifier, the issued token must be signed by a certificate in the collection returned by the property of the class.
+
+- When the issued token is signed using an X.509 certificate, the certificate must validate per the semantics specified by the value of the property, regardless of whether the certificate was sent to the relying party as a or was obtained from the property. For more information about X.509 certificate validation, see [Working with Certificates](working-with-certificates.md).
+
+ For example, setting the to would authenticate any issued token whose signing certificate is in the `TrustedPeople` certificate store. In that case, set the property to either or . You can select other modes, including . When `Custom` is selected, you must assign an instance of the class to the property. The custom validator can validate certificates using any criteria it likes. For more information, see [How to: Create a Service that Employs a Custom Certificate Validator](../extending/how-to-create-a-service-that-employs-a-custom-certificate-validator.md).
+
## See also
- [Federation](federation.md)
diff --git a/docs/framework/wcf/feature-details/how-to-configure-idle-behavior-with-workflowservicehost.md b/docs/framework/wcf/feature-details/how-to-configure-idle-behavior-with-workflowservicehost.md
index 8bf3d3b1ca8de..8531775a0ce0a 100644
--- a/docs/framework/wcf/feature-details/how-to-configure-idle-behavior-with-workflowservicehost.md
+++ b/docs/framework/wcf/feature-details/how-to-configure-idle-behavior-with-workflowservicehost.md
@@ -2,41 +2,41 @@
description: "Learn more about: How to: Configure Idle Behavior with WorkflowServiceHost"
title: "How to: Configure Idle Behavior with WorkflowServiceHost"
ms.date: "03/30/2017"
-dev_langs:
+dev_langs:
- "csharp"
- "vb"
ms.assetid: 1bb93652-d687-46ff-bff6-69ecdcf97437
---
# How to: Configure Idle Behavior with WorkflowServiceHost
-Workflows go idle when they encounter a bookmark that must be resumed by some external stimulus, for example when the workflow instance is waiting for a message to be delivered using a activity. is a behavior that allows you to specify the time between when a service instance goes idle and when the instance is persisted or unloaded. It contains two properties that enable you to set these time spans. specifies the time span between when a workflow service instance goes idle and when the workflow service instance is persisted. specifies the time span between when a workflow service instance goes idle and when the workflow service instance is unloaded, where unload means persisting the instance to the instance store and removing it from memory. This topic explains how to configure the in a configuration file.
-
-### To configure WorkflowIdleBehavior
-
-1. Add a <`workflowIdle`> element to the <`behavior`> element within the <`serviceBehaviors`> element as shown in the following example.
-
- ```xml
-
-
-
+Workflows go idle when they encounter a bookmark that must be resumed by some external stimulus, for example when the workflow instance is waiting for a message to be delivered using a activity. is a behavior that allows you to specify the time between when a service instance goes idle and when the instance is persisted or unloaded. It contains two properties that enable you to set these time spans. specifies the time span between when a workflow service instance goes idle and when the workflow service instance is persisted. specifies the time span between when a workflow service instance goes idle and when the workflow service instance is unloaded, where unload means persisting the instance to the instance store and removing it from memory. This topic explains how to configure the in a configuration file.
+
+### To configure WorkflowIdleBehavior
+
+1. Add a `` element to the `` element within the `` element as shown in the following example.
+
+ ```xml
+
+
+
-
-
-
- ```
-
- The `timeToUnload` attribute specifies the time period between when a workflow service instance goes idle and when the workflow service is unloaded. The `timeToPersist` attribute specifies the time period between when a workflow service instance goes idle and when the workflow service instance is persisted. The default value for `timeToUnload` is 1 minute. The default value for `timeToPersist` is . If you want to keep idle instances in memory but persist them for robustness, set values so that `timeToPersist` < `timeToUnload`. If you want to prevent idle instances from being unloaded, set `timeToUnload` to . For more information about , see [Workflow Service Host Extensibility](workflow-service-host-extensibility.md)
-
+
+
+
+ ```
+
+ The `timeToUnload` attribute specifies the time period between when a workflow service instance goes idle and when the workflow service is unloaded. The `timeToPersist` attribute specifies the time period between when a workflow service instance goes idle and when the workflow service instance is persisted. The default value for `timeToUnload` is 1 minute. The default value for `timeToPersist` is . If you want to keep idle instances in memory but persist them for robustness, set values so that `timeToPersist` < `timeToUnload`. If you want to prevent idle instances from being unloaded, set `timeToUnload` to . For more information about , see [Workflow Service Host Extensibility](workflow-service-host-extensibility.md)
+
> [!NOTE]
- > The preceding configuration sample is using simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md).
-
-### To change idle behavior in code
-
-- The following example changes the time to wait before persisting and unloading programmatically.
-
+ > The preceding configuration sample is using simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md).
+
+### To change idle behavior in code
+
+- The following example changes the time to wait before persisting and unloading programmatically.
+
[!code-csharp[Wf_SvcHost_Idle_persist#1](../../../../samples/snippets/csharp/VS_Snippets_CFX/wf_svchost_idle_persist/cs/source.cs#1)]
- [!code-vb[Wf_SvcHost_Idle_persist#1](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/wf_svchost_idle_persist/vb/source.vb#1)]
-
+ [!code-vb[Wf_SvcHost_Idle_persist#1](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/wf_svchost_idle_persist/vb/source.vb#1)]
+
## See also
- [Workflow Service Host Extensibility](workflow-service-host-extensibility.md)
diff --git a/docs/framework/wcf/feature-details/how-to-configure-persistence-with-workflowservicehost.md b/docs/framework/wcf/feature-details/how-to-configure-persistence-with-workflowservicehost.md
index 8594c72478c6b..f2dfc54fa0942 100644
--- a/docs/framework/wcf/feature-details/how-to-configure-persistence-with-workflowservicehost.md
+++ b/docs/framework/wcf/feature-details/how-to-configure-persistence-with-workflowservicehost.md
@@ -9,7 +9,7 @@ This article describes how to configure the SQL Workflow Instance Store feature
## To Configure the SQL Workflow Instance Store in Configuration
-1. The properties of the SQL workflow instance store can be configured through the , a service behavior that allows you to change the settings through XML configuration. The following configuration example shows how to configure the SQL workflow instance store by using the <`sqlWorkflowInstanceStore`> behavior element in a configuration file.
+1. The properties of the SQL workflow instance store can be configured through the , a service behavior that allows you to change the settings through XML configuration. The following configuration example shows how to configure the SQL workflow instance store by using the `` behavior element in a configuration file.
```xml
@@ -26,7 +26,7 @@ This article describes how to configure the SQL Workflow Instance Store feature
```
- For more information about how to configure the SQL workflow instance store, see [How to: Enable SQL Persistence for Workflows and Workflow Services](../../windows-workflow-foundation/how-to-enable-sql-persistence-for-workflows-and-workflow-services.md). For more information about the individual settings for the <`sqlWorkflowInstanceStore`> behavior element, see [SQL Workflow Instance Store](../../windows-workflow-foundation/sql-workflow-instance-store.md).
+ For more information about how to configure the SQL workflow instance store, see [How to: Enable SQL Persistence for Workflows and Workflow Services](../../windows-workflow-foundation/how-to-enable-sql-persistence-for-workflows-and-workflow-services.md). For more information about the individual settings for the `` behavior element, see [SQL Workflow Instance Store](../../windows-workflow-foundation/sql-workflow-instance-store.md).
> [!NOTE]
> The preceding configuration example uses simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md)
diff --git a/docs/framework/wcf/feature-details/how-to-configure-tracking-with-workflowservicehost.md b/docs/framework/wcf/feature-details/how-to-configure-tracking-with-workflowservicehost.md
index 0e567be0983da..d6c067cbc03ab 100644
--- a/docs/framework/wcf/feature-details/how-to-configure-tracking-with-workflowservicehost.md
+++ b/docs/framework/wcf/feature-details/how-to-configure-tracking-with-workflowservicehost.md
@@ -6,64 +6,64 @@ ms.assetid: ed1485fe-7529-4351-bca3-8bb915260b17
---
# How to: Configure Tracking with WorkflowServiceHost
-This topic explains how to configure tracking for a [!INCLUDE[netfx_current_long](../../../../includes/netfx-current-long-md.md)] workflow hosted in . It is configured through a Web.config file by specifying a service behavior.
-
-### Configure Tracking in Configuration
-
-1. Add the using the <`behavior`> element in a configuration file, as shown in the following example.
-
- ```xml
-
-
-
-
+This topic explains how to configure tracking for a [!INCLUDE[netfx_current_long](../../../../includes/netfx-current-long-md.md)] workflow hosted in . It is configured through a Web.config file by specifying a service behavior.
+
+### Configure Tracking in Configuration
+
+1. Add the using the `` element in a configuration file, as shown in the following example.
+
+ ```xml
+
+
+
+
-
-
- ```
-
+
+
+ ```
+
> [!NOTE]
- > The preceding configuration sample is using simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md).
-
- The preceding configuration sample adds a and specifies a tracking profile name. Tracking profiles are created in a <`trackingProfile`> element within a <`tracking`> element. The tracking profile contains tracking queries that permit a tracking participant to subscribe to workflow events that are emitted when the state of a workflow instance changes at run time. The following example shows how to create a tracking profile.
-
- ```xml
-
+ > The preceding configuration sample is using simplified configuration. For more information, see [Simplified Configuration](../simplified-configuration.md).
+
+ The preceding configuration sample adds a and specifies a tracking profile name. Tracking profiles are created in a `` element within a `` element. The tracking profile contains tracking queries that permit a tracking participant to subscribe to workflow events that are emitted when the state of a workflow instance changes at run time. The following example shows how to create a tracking profile.
+
+ ```xml
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
- ```
-
- For more information about tracking profiles, see [Tracking Profiles](../../windows-workflow-foundation/tracking-profiles.md).
-
- For more information about tracking in general, see [Workflow Tracking and Tracing](../../windows-workflow-foundation/workflow-tracking-and-tracing.md).
-
-### Configure Tracking in Code
-
-1. Add the using the behavior in code, as shown in the following example.
-
- ```csharp
- host.Description.Behaviors.Add(new EtwTrackingBehavior { ProfileName = "Sample Tracking Profile" });
- ```
-
- The preceding code sample adds a and specifies a tracking profile name. Tracking profiles are created in a <`trackingProfile`> element within a <`tracking`> element as shown in the previous section.
-
- For more information about tracking profiles, see [Tracking Profiles](../../windows-workflow-foundation/tracking-profiles.md).
-
- For more information about tracking in general, see [Workflow Tracking and Tracing](../../windows-workflow-foundation/workflow-tracking-and-tracing.md). For an example of configuring tracking programmatically see [Configuring Tracking for a Workflow](../../windows-workflow-foundation/configuring-tracking-for-a-workflow.md).
-
+
+
+ ```
+
+ For more information about tracking profiles, see [Tracking Profiles](../../windows-workflow-foundation/tracking-profiles.md).
+
+ For more information about tracking in general, see [Workflow Tracking and Tracing](../../windows-workflow-foundation/workflow-tracking-and-tracing.md).
+
+### Configure Tracking in Code
+
+1. Add the using the behavior in code, as shown in the following example.
+
+ ```csharp
+ host.Description.Behaviors.Add(new EtwTrackingBehavior { ProfileName = "Sample Tracking Profile" });
+ ```
+
+ The preceding code sample adds a and specifies a tracking profile name. Tracking profiles are created in a `` element within a `` element as shown in the previous section.
+
+ For more information about tracking profiles, see [Tracking Profiles](../../windows-workflow-foundation/tracking-profiles.md).
+
+ For more information about tracking in general, see [Workflow Tracking and Tracing](../../windows-workflow-foundation/workflow-tracking-and-tracing.md). For an example of configuring tracking programmatically see [Configuring Tracking for a Workflow](../../windows-workflow-foundation/configuring-tracking-for-a-workflow.md).
+
## See also
- [Simplified Configuration for WCF Services](../samples/simplified-configuration-for-wcf-services.md)
diff --git a/docs/framework/wcf/feature-details/how-to-create-a-federated-client.md b/docs/framework/wcf/feature-details/how-to-create-a-federated-client.md
index 38be02de5050d..621d37cf020ce 100644
--- a/docs/framework/wcf/feature-details/how-to-create-a-federated-client.md
+++ b/docs/framework/wcf/feature-details/how-to-create-a-federated-client.md
@@ -2,164 +2,164 @@
description: "Learn more about: How to: Create a Federated Client"
title: "How to: Create a Federated Client"
ms.date: "03/30/2017"
-dev_langs:
+dev_langs:
- "csharp"
- "vb"
-helpviewer_keywords:
+helpviewer_keywords:
- "WCF, federation"
- "federation"
ms.assetid: 56ece47e-98bf-4346-b92b-fda1fc3b4d9c
---
# How to: Create a Federated Client
-In Windows Communication Foundation (WCF), creating a client for a *federated service* consists of three main steps:
-
-1. Configure a [\](../../configure-apps/file-schema/wcf/wsfederationhttpbinding.md) or similar custom binding. For more information about creating an appropriate binding, see [How to: Create a WSFederationHttpBinding](how-to-create-a-wsfederationhttpbinding.md). Alternatively, run the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) against the metadata endpoint of the federated service to generate a configuration file for communicating with the federated service and one or more security token services.
-
-2. Set the properties of the that controls various aspects of a client's interaction with a security token service.
-
-3. Set the properties of the , which allows certificates needed to communicate securely with given endpoints, such as security token services.
-
+In Windows Communication Foundation (WCF), creating a client for a *federated service* consists of three main steps:
+
+1. Configure a [\](../../configure-apps/file-schema/wcf/wsfederationhttpbinding.md) or similar custom binding. For more information about creating an appropriate binding, see [How to: Create a WSFederationHttpBinding](how-to-create-a-wsfederationhttpbinding.md). Alternatively, run the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) against the metadata endpoint of the federated service to generate a configuration file for communicating with the federated service and one or more security token services.
+
+2. Set the properties of the that controls various aspects of a client's interaction with a security token service.
+
+3. Set the properties of the , which allows certificates needed to communicate securely with given endpoints, such as security token services.
+
> [!NOTE]
-> A might be thrown when a client uses impersonated credentials, the binding or a custom-issued token, and asymmetric keys. Asymmetric keys are used with the binding and custom-issued tokens when the and properties, respectively, are set to . The is thrown when the client attempts to send a message and a user profile doesn’t exist for the identity that the client is impersonating. To mitigate this issue, log on to the client computer or call `LoadUserProfile` before sending the message.
-
- This topic provides detailed information about these procedures. For more information about creating an appropriate binding, see [How to: Create a WSFederationHttpBinding](how-to-create-a-wsfederationhttpbinding.md). For more information about how a federated service works, see [Federation](federation.md).
-
-### To generate and examine the configuration for a federated service
-
-1. Run the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) with the address of the metadata URL of the service as a command-line parameter.
-
-2. Open the generated configuration file in an appropriate editor.
-
-3. Examine the attributes and content of any generated [\](../../configure-apps/file-schema/wcf/issuer.md) and [\](../../configure-apps/file-schema/wcf/issuermetadata.md) elements. These are located within the [\](../../configure-apps/file-schema/wcf/security-of-wsfederationhttpbinding.md) elements for the [\](../../configure-apps/file-schema/wcf/wsfederationhttpbinding.md) or custom bindings elements. Ensure that the addresses contain the expected domain names or other address information. It is important to check this information because the client authenticates to these addresses and may disclose information such as user name/password pairs. If the address is not the expected address, this could result in information disclosure to an unintended recipient.
-
-4. Examine any additional [\](../../configure-apps/file-schema/wcf/issuedtokenparameters.md) elements inside the commented out <`alternativeIssuedTokenParameters`> element. When using the Svcutil.exe tool to generate configuration for a federated service, if the federated service or any intermediate security token services do not specify an issuer address, but rather specify a metadata address for a security token service that exposes multiple endpoints, the resulting configuration file refers to the first endpoint. Additional endpoints are in the configuration file as commented-out <`alternativeIssuedTokenParameters`> elements.
-
- Determine whether one of these <`issuedTokenParameters`> is preferable to the one already present in the configuration. For example, the client may prefer to authenticate to a security token service using a Windows CardSpace token rather than a user name/password pair.
-
+> A might be thrown when a client uses impersonated credentials, the binding or a custom-issued token, and asymmetric keys. Asymmetric keys are used with the binding and custom-issued tokens when the and properties, respectively, are set to . The is thrown when the client attempts to send a message and a user profile doesn’t exist for the identity that the client is impersonating. To mitigate this issue, log on to the client computer or call `LoadUserProfile` before sending the message.
+
+ This topic provides detailed information about these procedures. For more information about creating an appropriate binding, see [How to: Create a WSFederationHttpBinding](how-to-create-a-wsfederationhttpbinding.md). For more information about how a federated service works, see [Federation](federation.md).
+
+### To generate and examine the configuration for a federated service
+
+1. Run the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) with the address of the metadata URL of the service as a command-line parameter.
+
+2. Open the generated configuration file in an appropriate editor.
+
+3. Examine the attributes and content of any generated [\](../../configure-apps/file-schema/wcf/issuer.md) and [\](../../configure-apps/file-schema/wcf/issuermetadata.md) elements. These are located within the [\](../../configure-apps/file-schema/wcf/security-of-wsfederationhttpbinding.md) elements for the [\](../../configure-apps/file-schema/wcf/wsfederationhttpbinding.md) or custom bindings elements. Ensure that the addresses contain the expected domain names or other address information. It is important to check this information because the client authenticates to these addresses and may disclose information such as user name/password pairs. If the address is not the expected address, this could result in information disclosure to an unintended recipient.
+
+4. Examine any additional [\](../../configure-apps/file-schema/wcf/issuedtokenparameters.md) elements inside the commented out `` element. When using the Svcutil.exe tool to generate configuration for a federated service, if the federated service or any intermediate security token services do not specify an issuer address, but rather specify a metadata address for a security token service that exposes multiple endpoints, the resulting configuration file refers to the first endpoint. Additional endpoints are in the configuration file as commented-out `` elements.
+
+ Determine whether one of these `` is preferable to the one already present in the configuration. For example, the client may prefer to authenticate to a security token service using a Windows CardSpace token rather than a user name/password pair.
+
> [!NOTE]
- > Where multiple security token services must be traversed before communicating with the service, it is possible for an intermediate security token service to direct the client to an incorrect security token service. Therefore, ensure that the endpoint for the security token service in the [\](../../configure-apps/file-schema/wcf/issuedtokenparameters.md) is the expected security token service and not an unknown security token service.
-
-### To configure an IssuedTokenClientCredential in code
-
-1. Access the through the property of the class (returned by the property of the class, or through the class), as shown in the following example code.
-
+ > Where multiple security token services must be traversed before communicating with the service, it is possible for an intermediate security token service to direct the client to an incorrect security token service. Therefore, ensure that the endpoint for the security token service in the [\](../../configure-apps/file-schema/wcf/issuedtokenparameters.md) is the expected security token service and not an unknown security token service.
+
+### To configure an IssuedTokenClientCredential in code
+
+1. Access the through the property of the class (returned by the property of the class, or through the class), as shown in the following example code.
+
[!code-csharp[c_CreateSTS#9](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_creatests/cs/source.cs#9)]
- [!code-vb[c_CreateSTS#9](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#9)]
-
-2. If token caching is not required, set the property to `false`. The property controls whether such tokens from a security token service are cached. If this property is set to `false`, the client requests a new token from the security token service whenever it must re-authenticate itself to the federated service, regardless of whether a previous token is still valid. If this property is set to `true`, the client reuses an existing token whenever it must re-authenticate itself to the federated service (as long as the token has not expired). The default is `true`.
-
-3. If a time limit is required on cached tokens, set the property to a value. The property specifies how long a token can be cached. After the specified time span has elapsed, the token is removed from the client cache. By default, tokens are cached indefinitely. The following example sets the time span to 10 minutes.
-
+ [!code-vb[c_CreateSTS#9](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#9)]
+
+2. If token caching is not required, set the property to `false`. The property controls whether such tokens from a security token service are cached. If this property is set to `false`, the client requests a new token from the security token service whenever it must re-authenticate itself to the federated service, regardless of whether a previous token is still valid. If this property is set to `true`, the client reuses an existing token whenever it must re-authenticate itself to the federated service (as long as the token has not expired). The default is `true`.
+
+3. If a time limit is required on cached tokens, set the property to a value. The property specifies how long a token can be cached. After the specified time span has elapsed, the token is removed from the client cache. By default, tokens are cached indefinitely. The following example sets the time span to 10 minutes.
+
[!code-csharp[c_CreateSTS#15](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_creatests/cs/source.cs#15)]
- [!code-vb[c_CreateSTS#15](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#15)]
-
-4. Optional. Set the to a percentage. The default is 60 (percent). The property specifies a percentage of the token's validity period. For example, if the issued token is valid for 10 hours and is set to 80, then the token is renewed after eight hours. The following example sets the value to 80 percent.
-
+ [!code-vb[c_CreateSTS#15](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#15)]
+
+4. Optional. Set the to a percentage. The default is 60 (percent). The property specifies a percentage of the token's validity period. For example, if the issued token is valid for 10 hours and is set to 80, then the token is renewed after eight hours. The following example sets the value to 80 percent.
+
[!code-csharp[c_CreateSTS#16](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_creatests/cs/source.cs#16)]
- [!code-vb[c_CreateSTS#16](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#16)]
-
- The renewal interval determined by the token validity period and the `IssuedTokenRenewalThresholdPercentage` value is overridden by the `MaxIssuedTokenCachingTime` value in cases where the caching time is shorter than the renewal threshold time. For example, if the product of `IssuedTokenRenewalThresholdPercentage` and the token's duration is eight hours, and the `MaxIssuedTokenCachingTime` value is 10 minutes, the client contacts the security token service for an updated token every 10 minutes.
-
-5. If a key entropy mode other than is needed on a binding that does not use message security or transport security with message credentials (for example. the binding does not have a ), set the property to an appropriate value. The *entropy* mode determines whether symmetric keys can be controlled using the property. This default is , where both the client and the token issuer provide data that is combined to produce the actual key. Other values are and , which means the entire key is specified by the client or the server, respectively. The following example sets the property to use only the server data for the key.
-
+ [!code-vb[c_CreateSTS#16](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#16)]
+
+ The renewal interval determined by the token validity period and the `IssuedTokenRenewalThresholdPercentage` value is overridden by the `MaxIssuedTokenCachingTime` value in cases where the caching time is shorter than the renewal threshold time. For example, if the product of `IssuedTokenRenewalThresholdPercentage` and the token's duration is eight hours, and the `MaxIssuedTokenCachingTime` value is 10 minutes, the client contacts the security token service for an updated token every 10 minutes.
+
+5. If a key entropy mode other than is needed on a binding that does not use message security or transport security with message credentials (for example. the binding does not have a ), set the property to an appropriate value. The *entropy* mode determines whether symmetric keys can be controlled using the property. This default is , where both the client and the token issuer provide data that is combined to produce the actual key. Other values are and , which means the entire key is specified by the client or the server, respectively. The following example sets the property to use only the server data for the key.
+
[!code-csharp[c_CreateSTS#17](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_creatests/cs/source.cs#17)]
- [!code-vb[c_CreateSTS#17](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#17)]
-
+ [!code-vb[c_CreateSTS#17](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#17)]
+
> [!NOTE]
- > If a is present in a security token service or service binding, the set on is overridden by the property of the `SecurityBindingElement`.
-
-6. Configure any issuer-specific endpoint behaviors by adding them to the collection returned by the property.
-
+ > If a is present in a security token service or service binding, the set on is overridden by the property of the `SecurityBindingElement`.
+
+6. Configure any issuer-specific endpoint behaviors by adding them to the collection returned by the property.
+
[!code-csharp[c_CreateSTS#14](../../../../samples/snippets/csharp/VS_Snippets_CFX/c_creatests/cs/source.cs#14)]
- [!code-vb[c_CreateSTS#14](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#14)]
-
-### To configure the IssuedTokenClientCredential in configuration
-
-1. Create an [\](../../configure-apps/file-schema/wcf/issuedtoken.md) element as a child of the [\](../../configure-apps/file-schema/wcf/issuedtoken.md) element in an endpoint behavior.
-
-2. If token caching is not required, set the `cacheIssuedTokens` attribute (of the <`issuedToken`> element) to `false`.
-
-3. If a time limit is required on cached tokens, set the `maxIssuedTokenCachingTime` attribute on the <`issuedToken`> element to an appropriate value. For example:
- ``
-
-4. If a value other than the default is preferred, set the `issuedTokenRenewalThresholdPercentage` attribute on the <`issuedToken`> element to an appropriate value, for example:
-
- ```xml
-
- ```
-
-5. If a key entropy mode other than `CombinedEntropy` is on a binding that does not use message security or transport security with message credentials (for example, the binding does not have a `SecurityBindingElement`), set the `defaultKeyEntropyMode` attribute on the `` element to a either `ServerEntropy` or `ClientEntropy` as required.
-
- ```xml
-
- ```
-
-6. Optional. Configure any issuer-specific custom endpoint behavior by creating an <`issuerChannelBehaviors`> element as a child of the <`issuedToken`> element. For each behavior, create an <`add`> element as a child of the <`issuerChannelBehaviors`> element. Specify the issuer address of the behavior by setting the `issuerAddress` attribute on the <`add`> element. Specify the behavior itself by setting the `behaviorConfiguration` attribute on the <`add`> element.
-
- ```xml
-
-
-
- ```
-
-### To configure an X509CertificateRecipientClientCredential in code
-
-1. Access the through the property of the property of the class or the property.
-
+ [!code-vb[c_CreateSTS#14](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/c_creatests/vb/source.vb#14)]
+
+### To configure the IssuedTokenClientCredential in configuration
+
+1. Create an [\](../../configure-apps/file-schema/wcf/issuedtoken.md) element as a child of the [\](../../configure-apps/file-schema/wcf/issuedtoken.md) element in an endpoint behavior.
+
+2. If token caching is not required, set the `cacheIssuedTokens` attribute (of the `` element) to `false`.
+
+3. If a time limit is required on cached tokens, set the `maxIssuedTokenCachingTime` attribute on the `` element to an appropriate value. For example:
+ ``
+
+4. If a value other than the default is preferred, set the `issuedTokenRenewalThresholdPercentage` attribute on the `` element to an appropriate value, for example:
+
+ ```xml
+
+ ```
+
+5. If a key entropy mode other than `CombinedEntropy` is on a binding that does not use message security or transport security with message credentials (for example, the binding does not have a `SecurityBindingElement`), set the `defaultKeyEntropyMode` attribute on the `` element to a either `ServerEntropy` or `ClientEntropy` as required.
+
+ ```xml
+