I have a WCF App that I am coding. I start and stop it several times as I change things and then run the service call again.
Since I need session info I am using wsHttpBinding
.
Before I moved to wsHttpBinding
I was using basicHttpBinding
and I could stop the service, make changes and re-start it. Then I could run my WCF test client (WCF Storm) against the endpoint and it would still run fine.
Now it tells me:
The message could not be processed. This is most likely because the action 'http://tempuri.org/IMyService/MyOperation' 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.
This means I have to refresh my connection and re-setup my service call (which gets annoying after several hundred times.).
I read that the security timeout is 10 minutes. I am re-running in less that 2 minutes, so I don't think it is a time out issue.
My guess is that the token expires for the obvious reason that I have killed and restarted the service.
The thing is that I don't need the security stuff at all (I only need the session stuff or I would be using BasicHttpBinding
Is there anyway to make my WCF Service not care about Security Context Tokens?
Note: My test client defaults to wsHttpBinding and has security set. But I assume that it is setting this because my service is publishing that it needs security.
Things I have tried:
I have tried a configuration similar to what I found Here
<bindings> <wsHttpBinding> <binding name="WsEventLogBinding"> <security mode="Message"> <message establishSecurityContext="false" /> </security> </binding> </wsHttpBinding> </bindings>
But I don't really know what this means or if it is what I need (which is no security at all (for now)).
This did not remove the issue.
- Setting
<security mode="None">
This did not help.