question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FaultExceptions thrown from UserNamePasswordValidators do not get serialised when using BasicHttpBinding

See original GitHub issue

Hello,

Last year I submitted #676, I’ve just upgraded our CoreWCF references to bring in the change, but unfortunately in my case it is still present, at least for BasicHttpBindings. The unit test which the PR for was validated against covered WSHttpBidnings.

The root cause is the TransportSecurityBindingElement.BuildServiceDispatcherCore builds a SecurityServiceDispatcher and does not set SendUnsecuredFaults to true.

This causes error responses to get lost, and the underlying connection is unexpectedly aborted for the client.

The SecurityServiceDispatcher is marked as internal and I can’t see an obvious way to programmatically set the desired property to true.

In the mean time I’m going to have to revert back and continue using my exception catching middleware which “fakes” a correct WCF error response.

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
dtrianacommented, Jul 28, 2023

@g7ed6e With the build released today, 1.5.0-alpha.18, I’m finally getting the SOAP error response for authentication errors in my migrated application, thank you so much!

0reactions
g7ed6ecommented, Jul 20, 2023

@marlon-tucker thank you for feedback. I’m closing the issue then as #1083 resolved it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom UserNamePasswordValidator not called - wcf
Transport, as far as I understand, requires HTTPS to encrypt credentials and throws an exception if there is no SSL. TransportCredentialOnly ...
Read more >
BasicHttpBinding with Custom Authorization
I am going to get the WCF client to transmit a username and password to the WCF service and authentication will fail if...
Read more >
WCF basicHttp endpoint returns server 500 but wsHttp ...
My code is being hit just fine and it's throwing a fault exception fine. The Message Header is empty on the basicHttpBinding but...
Read more >
UserNamePasswordValidator method never called
My problem is that my Validator method, which overrides UserNamePasswordValidator.Validate is never being called. I use VS 2008 with built-in Cassini ...
Read more >
BasicHttpBinding Class (System.ServiceModel)
Gets or sets the constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding. (Inherited from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found