Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Parameters

configurationName

The name of the configuration file.

Exception typeCondition

InvalidOperationException

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft