dotnet / dotnet/wcf

Exception thrown from Opening event handler causes hung state

Open
#3,019 4 comments 0 reactions 1 assignee Claimed by @KKhurin View on GitHub
Backlog bug
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

If an exception is thrown from the ICommunicationObject.Faulted event handler, execution becomes hung. It works fine on the old .NET Framework WCF.

**Steps to Reproduce**
1. Create a WCF client (I used dotnet-svcutil on a SOAP service)
2. Instantiate the client
3. Call `client.Opening += (sender, args) => throw new Exception("Triggering Faulted state")`
4. Execute a method on the client

**Expected Result**
- An exception is thrown and `client.State` becomes `CommunicationState.Faulted`

**Actual Result**
- Execution hangs

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.