-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
docs/core/compatibility/wcf-client/8.0/configurationname-apis.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: "Removal of WCF APIs with a `configurationName` parameter" | ||
description: Learn about the breaking change in WCF 8 where the APIs that accept a `configurationName` parameter have been removed. | ||
ms.date: 11/13/2024 | ||
ai-usage: ai-assisted | ||
ms.custom: https://github.com/dotnet/docs/issues/43111 | ||
--- | ||
|
||
# Removal of WCF APIs with a `configurationName` parameter | ||
|
||
The WCF APIs that accept either a `configurationName` parameter or an `endpointConfigurationName` parameter have been removed in WCF 8. These APIs were previously used in .NET Framework to load client configuration parameters such as the `Binding` configuration and the `EndpointAddress` details. | ||
|
||
## Version introduced | ||
|
||
WCF Client 8.0 GA | ||
|
||
## Previous behavior | ||
|
||
The removed APIs were previously suppressed from IntelliSense suggestions, however, projects that used them compiled successfully. Using any of the removed APIs resulted in a <xref:System.PlatformNotSupportedException> at run time. | ||
|
||
## New behavior | ||
|
||
The [affected APIs](#affected-apis) no longer exist. If you upgrade to WCF 8 and recompile your project, it will fail. | ||
|
||
## Type of breaking change | ||
|
||
This change can affect [source compatibility](../../categories.md#source-compatibility). | ||
|
||
## Reason for change | ||
|
||
The [affected APIs](#affected-apis) were never implemented on .NET, and any calls to these APIs previously resulted in a run-time exception. Thus the decision was made to remove them completely. | ||
|
||
## Recommended action | ||
|
||
Remove any usage of the [affected APIs](#affected-apis). | ||
|
||
If you're using a WCF client generated by the `svcutil` utility from the .NET Framework SDK, the generated client will have constructors that call base class constructors that have been removed. The base class will be either <xref:System.ServiceModel.ClientBase`1> or <xref:System.ServiceModel.DuplexClientBase`1>. The generated constructors were unusable on .NET as they resulted in a `PlatformNotSupportedException` being thrown. | ||
|
||
- If you're multi-targeting .NET Framework and .NET and are still using these generated constructors on .NET Framework, you'll need to conditionally compile their usage. | ||
- If you're not using these constructors, you can delete them from the generated code. Alternatively, consider regenerating the client using `dotnet-svcutil`. | ||
|
||
## Affected APIs | ||
|
||
- <xref:System.ServiceModel.NetHttpBinding.%23ctor(System.String)> | ||
- <xref:System.ServiceModel.NetTcpBinding.%23ctor(System.String)> | ||
- <xref:System.ServiceModel.ChannelFactory.ApplyConfiguration(System.String)?displayProperty=fullName> | ||
- <xref:System.ServiceModel.ChannelFactory.InitializeEndpoint(System.String,System.ServiceModel.EndpointAddress)?displayProperty=fullName> | ||
- <xref:System.ServiceModel.ChannelFactory`1.%23ctor(System.String)> | ||
- <xref:System.ServiceModel.ChannelFactory`1.%23ctor(System.String,System.ServiceModel.EndpointAddress)> | ||
- <xref:System.ServiceModel.DuplexChannelFactory`1.%23ctor(System.ServiceModel.InstanceContext,System.String)> | ||
- <xref:System.ServiceModel.DuplexChannelFactory`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.ServiceModel.EndpointAddress)> | ||
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String)> | ||
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.ServiceModel.EndpointAddress)> | ||
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.String)> |