dotnet / dotnet/wcf

WCF Client (.net8.0 Win form Exe) Call will Hung if Sync Method is Invoked before Invoking any Async Method

Open
#5,730 8 comments 1 reaction 1 assignee Claimed by @mconnew View on GitHub
triaged
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

**Repro:**
1. Create WCF service with NetTCP binding with runtime as .Net framework 4.8
2. Create WCF client (Win forms exe) using WCF client packages 8.1 and runtime as .Net 8.0

![Image](https://github.com/user-attachments/assets/2a9a575f-28ab-4deb-bb7a-4dbca6c53b98)

**Expected Results:**
Both operations should return irrespective of the sequence of requests

**Actual Results:**
Scenario 1: If Sync call (button2_Click) is Invoked first, call never returns
Scenario 2: If Async call (button1_Click) is Invoked first and then Sync call (button_Click) is invoked, results are as expected
Scenario 3: Sync calls works fine provided async call was invoked at least once

No issue if client is running on .Net framework.
No issue if client is a console application on .Net 8.0

@mconnew , How to justify the above behavior with WCF client packages on .Net 8.0 ?
Your clarifications will help me to assess the feasibility of WCF client codebase migration to .Net 8.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.