Skip to content

[Breaking change]: Removal of WCF api's with a configurationName parameter #43111

@mconnew

Description

@mconnew

Description

The WCF api's which accept either a configurationName parameter or an endpointConfigurationName parameter were used in .NET Framework to load client configuration parameters such as the Binding configuration, and the EndpointAddress details. These api's have been removed.

Version

.NET 8 GA

Previous behavior

The removed api's were previously suppressed from Intellisense suggestions. Using any of the removed api's would result in a PlatformNotSupportedException being thrown.

New behavior

The api's no longer exist.

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

These api's were not implemented on .NET and any calls to these api's would result in an exception.

Recommended action

Remove any usage of these api's. If you are using a WCF client generated by the svcutil utility from the .NET Framework SDK, the generated client will have constructors which call base class constructors that have been removed. The base class will be either ClientBase<TChannel> or DuplexClientBase<TChannel>. The generated constructors were unusable on .NET as they would have resulted in a PlatformNotSupportedException being thrown. If you are multi-targeting .NET Framework and .NET and are still using these generated constructors on .NET Framework, usage will need to be conditionally compiled. If you are not using these constructors, you can delete them from the generated code. Alternatively, consider regenerating the client using dotnet-svcutil.

Feature area

WCF Client

Affected APIs

System.ServiceModel.NetHttpBinding.NetHttpBinding(string configurationName);
System.ServiceModel.NetTcpBinding.NetTcpBinding(string configurationName);
System.ServiceModel.ChannelFactory.ApplyConfiguration(string configurationName);
System.ServiceModel.ChannelFactory.InitializeEndpoint(string configurationName, System.ServiceModel.EndpointAddress address);
System.ServiceModel.ChannelFactory<TChannel>.ChannelFactory(string endpointConfigurationName);
System.ServiceModel.ChannelFactory<TChannel>.ChannelFactory(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress);
System.ServiceModel.DuplexChannelFactory.DuplexChannelFactory(System.ServiceModel.InstanceContext callbackInstance, string endpointConfigurationName);
System.ServiceModel.DuplexChannelFactory.DuplexChannelFactory(System.ServiceModel.InstanceContext callbackInstance, string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress);
System.ServiceModel.DuplexClientBase.DuplexClientBase<TChannel>(System.ServiceModel.InstanceContext callbackInstance, string endpointConfigurationName);
System.ServiceModel.DuplexClientBase.DuplexClientBase<TChannel>(System.ServiceModel.InstanceContext callbackInstance, string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress);
System.ServiceModel.DuplexClientBase.DuplexClientBase<TChannel>(System.ServiceModel.InstanceContext callbackInstance, string endpointConfigurationName, string remoteAddress);

Associated WorkItem - 340211

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.binary incompatibleExisting binaries may encounter a breaking change in behavior.breaking-changeIndicates a .NET Core breaking changein-prThis issue will be closed (fixed) by an active pull request.source incompatibleSource code may encounter a breaking change in behavior when targeting the new version.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions