Feature/273 retry on fault wcfsoapwithopenidconnect - #274
Open
ddemeyer wants to merge 2 commits into
Open
Conversation
Added RetryOnFaultProxy<T>, a System.Reflection.DispatchProxy-based wrapper used by all Get*25Channel() accessors in InfoShareWcfSoapWithOpenIdConnectConnection. Catches CommunicationException/FaultException on the actual SOAP call, rebuilds the channel via the existing (unchanged) rebuild logic, and retries exactly once within the same cmdlet invocation - instead of requiring the caller to re-run the cmdlet for the existing #201/#219 rebuild-on-next-call mechanism to kick in. Reflection's TargetInvocationException is unwrapped via ExceptionDispatchInfo so callers keep seeing the original exception type and stack trace. Only wraps the plain service-contract interface, not ICommunicationObject/IDisposable - channel state checks, Faulted event wiring and Dispose() bookkeeping keep operating on the raw private channel field unchanged. Scoped to WcfSoapWithOpenIdConnect only; WcfSoapWithWsTrust (maintain-only, removed in product 16.0.0) is untouched, matching #201/#219 precedent. OpenApiWithOpenIdConnect (REST) re-reads its bearer token fresh per call and has no equivalent issue. Added net48-only NuGet dependency System.Reflection.DispatchProxy (built into the BCL on net6.0+). Updated __ConnectionClassDiagram.cd and source-connection--csharp.instructions.md to document the new file per Connection layer conventions. No automated test coverage added: Connection/ has no existing Pester tests and WCF channel-fault behavior is not reproducible without a live server and fault injection; validated by manual reproduction against a live server.
…lt. Fixed StackOverflow error by adding private Ensure methods.
ivandelagemaat
approved these changes
Sep 2, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #273