Skip to content

Commit

Permalink
WCF APIs removed (#43568)
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren authored Nov 14, 2024
1 parent 9a5a3b3 commit b0bc4c9
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,10 @@ items:
href: visualbasic.md
- name: WCF Client
items:
- name: "8.0"
items:
- name: Removal of WCF APIs with a `configurationName` parameter
href: wcf-client/8.0/configurationname-apis.md
- name: "6.0"
items:
- name: .NET Standard 2.0 no longer supported
Expand Down
54 changes: 54 additions & 0 deletions docs/core/compatibility/wcf-client/8.0/configurationname-apis.md
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)>

0 comments on commit b0bc4c9

Please sign in to comment.