Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Invalid or expired security context token" when running after a debugging restart
    text
    copied!<p>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.</p> <p>Since I need session info I am using <code>wsHttpBinding</code>.</p> <p>Before I moved to <code>wsHttpBinding</code> I was using <code>basicHttpBinding</code> 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.</p> <p>Now it tells me:</p> <blockquote> <p>The message could not be processed. This is most likely because the action '<a href="http://tempuri.org/IMyService/MyOperation" rel="nofollow noreferrer">http://tempuri.org/IMyService/MyOperation</a>' is incorrect or because the message contains an invalid or expired <strong>security context token</strong> 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.</p> </blockquote> <p>This means I have to refresh my connection and re-setup my service call (which gets annoying after several hundred times.).</p> <p>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.</p> <p>My guess is that the token expires for the obvious reason that I have killed and restarted the service.</p> <p>The thing is that <strong>I don't need the security stuff at all</strong> (I only need the session stuff or I would be using BasicHttpBinding</p> <p><strong>Is there anyway to make my WCF Service not care about Security Context Tokens?</strong></p> <p><strong>Note:</strong> 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.</p> <p>Things I have tried:</p> <ul> <li><p>I have tried a configuration similar to what I found <a href="https://stackoverflow.com/a/8595915/16241">Here</a></p> <pre><code>&lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="WsEventLogBinding"&gt; &lt;security mode="Message"&gt; &lt;message establishSecurityContext="false" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; </code></pre></li> </ul> <p>But I don't really know what this means or if it is what I need (which is no security at all (for now)). </p> <p>This did not remove the issue.</p> <ul> <li>Setting <code>&lt;security mode="None"&gt;</code> This did not help.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload