Tony_Henrich
Tony_Henrich

Reputation: 44205

How to use BasicHttpBinding without using sessions in WCF? Getting error about session support

I have a WinForm app which uses WCF to call a WCF service. I am trying to troubleshoot an issue and need to look at the wcf trace file without any encryption. So I have WCF endpoint set to use BasicHttpBinding and my service contract is set for SessionMode = SessionMode.NotAllowed.

However I keep getting an error "Contract requires Session, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it".

I don't want to use sessions. Why does it think I want to use sessions?

OR how do I get the messages to go on the wire where I can see objects and their properties in clear text in the trace file?

Upvotes: 0

Views: 368

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364399

BasicHttpBinding never uses session. There is something incorrectly configured in your code (or you didn't correctly update service reference). To see messages even if security is enabled use Message logging.

Upvotes: 1

Related Questions