Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 3 tasks
mconnew opened this issue Oct 17, 2024 · 0 comments
Open
2 of 3 tasks
Assignees
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 source incompatible Source code may encounter a breaking change in behavior when targeting the new version. ⌚ Not Triaged Not triaged

Comments

@mconnew
Copy link
Member

mconnew commented Oct 17, 2024

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);
@mconnew mconnew added breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 labels Oct 17, 2024
@dotnetrepoman dotnetrepoman bot added ⌚ Not Triaged Not triaged binary incompatible Existing binaries may encounter a breaking change in behavior. source incompatible Source code may encounter a breaking change in behavior when targeting the new version. labels Oct 17, 2024
@gewarren gewarren removed the ⌚ Not Triaged Not triaged label Oct 17, 2024
@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 source incompatible Source code may encounter a breaking change in behavior when targeting the new version. ⌚ Not Triaged Not triaged
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants