Skip to content

Commit b0bc4c9

Browse files
authored
WCF APIs removed (#43568)
1 parent 9a5a3b3 commit b0bc4c9

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,10 @@ items:
19821982
href: visualbasic.md
19831983
- name: WCF Client
19841984
items:
1985+
- name: "8.0"
1986+
items:
1987+
- name: Removal of WCF APIs with a `configurationName` parameter
1988+
href: wcf-client/8.0/configurationname-apis.md
19851989
- name: "6.0"
19861990
items:
19871991
- name: .NET Standard 2.0 no longer supported
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Removal of WCF APIs with a `configurationName` parameter"
3+
description: Learn about the breaking change in WCF 8 where the APIs that accept a `configurationName` parameter have been removed.
4+
ms.date: 11/13/2024
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/43111
7+
---
8+
9+
# Removal of WCF APIs with a `configurationName` parameter
10+
11+
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.
12+
13+
## Version introduced
14+
15+
WCF Client 8.0 GA
16+
17+
## Previous behavior
18+
19+
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.
20+
21+
## New behavior
22+
23+
The [affected APIs](#affected-apis) no longer exist. If you upgrade to WCF 8 and recompile your project, it will fail.
24+
25+
## Type of breaking change
26+
27+
This change can affect [source compatibility](../../categories.md#source-compatibility).
28+
29+
## Reason for change
30+
31+
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.
32+
33+
## Recommended action
34+
35+
Remove any usage of the [affected APIs](#affected-apis).
36+
37+
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.
38+
39+
- 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.
40+
- If you're not using these constructors, you can delete them from the generated code. Alternatively, consider regenerating the client using `dotnet-svcutil`.
41+
42+
## Affected APIs
43+
44+
- <xref:System.ServiceModel.NetHttpBinding.%23ctor(System.String)>
45+
- <xref:System.ServiceModel.NetTcpBinding.%23ctor(System.String)>
46+
- <xref:System.ServiceModel.ChannelFactory.ApplyConfiguration(System.String)?displayProperty=fullName>
47+
- <xref:System.ServiceModel.ChannelFactory.InitializeEndpoint(System.String,System.ServiceModel.EndpointAddress)?displayProperty=fullName>
48+
- <xref:System.ServiceModel.ChannelFactory`1.%23ctor(System.String)>
49+
- <xref:System.ServiceModel.ChannelFactory`1.%23ctor(System.String,System.ServiceModel.EndpointAddress)>
50+
- <xref:System.ServiceModel.DuplexChannelFactory`1.%23ctor(System.ServiceModel.InstanceContext,System.String)>
51+
- <xref:System.ServiceModel.DuplexChannelFactory`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.ServiceModel.EndpointAddress)>
52+
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String)>
53+
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.ServiceModel.EndpointAddress)>
54+
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.String)>

0 commit comments

Comments
 (0)