CoreWCF / samples

MIT License
38 stars 19 forks source link

Sample for custom user/password validation #10

Closed samsp-msft closed 2 years ago

samsp-msft commented 2 years ago

@mconnew the client is failing at the call to the service with:

System.ServiceModel.Security.MessageSecurityException: 'An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.'

FaultException: The message could not be processed. This is most likely because the action 'http://tempuri.org/IEchoService/Echo' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

And I can't figure out why?

mconnew commented 2 years ago

Should we have a .sln file in Basic\Binding\WS for the client and server to be in the same solution? Also the naming of WS should always have the S uppercase too. Eg our binding is WSHttpBinding and not WsHttpBinding.

samsp-msft commented 2 years ago

We need a policy for sln files - is there only one at the root - or one per scenario? Having the client and server in the same sln is not that useful as you can't easily start both when like that, and if you do, the timing can be off so it won't work the way you think it should.