This documentation is archived and is not being maintained.

ChannelFactory.ApplyConfiguration Method

Initializes the channel factory with the behaviors provided by a specified configuration file and with those in the service endpoint of the channel factory.

Namespace: System.ServiceModel
Assembly: System.ServiceModel (in system.servicemodel.dll)

protected virtual void ApplyConfiguration (
	string configurationName
protected void ApplyConfiguration (
	String configurationName
protected function ApplyConfiguration (
	configurationName : String
Not applicable.



The name of the configuration file.

Exception typeCondition


The service endpoint of the channel factory is a null reference (Nothing in Visual Basic).

If configurationName is a null reference (Nothing in Visual Basic), only the behaviors specified in the service endpoint are loaded. If the wildcard, "*", is used, any endpoint configuration in the client configuration file is used, but only if there is precisely one. Otherwise an exception is thrown. Any other value for the configurationName, including the empty string "", matches the endpoint configuration with the same name. See the WCF Client Configuration topic for a discussion of the client configuration.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0