Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In my case the problem turned out to be a mismatch between security settings on client and server. I was using a custom binding like this:</p> <pre><code>&lt;customBinding&gt; &lt;binding name="AuthorisedBinaryHttpsBinding" receiveTimeout="00:03:00" sendTimeout="00:03:00"&gt; &lt;!-- this next element caused the problem: --&gt; &lt;security authenticationMode="UserNameOverTransport"&gt; &lt;/security&gt; &lt;binaryMessageEncoding&gt; &lt;readerQuotas maxDepth="100" maxStringContentLength="1000000" maxArrayLength="655360000" /&gt; &lt;/binaryMessageEncoding&gt; &lt;httpsTransport /&gt; &lt;/binding&gt; &lt;/customBinding&gt; </code></pre> <p>When I removed the security element that I've highlighted above the problem with the "Unable to automatically debug" message went away. </p> <p>To solve the problem I first turned on <a href="http://blogs.msdn.com/madhuponduru/archive/2006/05/18/601458.aspx" rel="noreferrer">WCF tracing</a>. This showed me that WCF was throwing a <strong>MessageSecurityException</strong>: </p> <blockquote> <p>Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.</p> </blockquote> <p>That pointed me to look at the Binding settings on the client side. It turned out that I hadn't added the required security element to my custom binding there. Since I was doing this through code, I needed the following (note the 3rd line):</p> <pre><code> var binding = new CustomBinding( binaryEncoding, SecurityBindingElement.CreateUserNameOverTransportBindingElement(), new HttpsTransportBindingElement { MaxReceivedMessageSize = MaxMessageSize, }); </code></pre> <p>As to why Visual Studio was showing that error, I've no idea - looks to me to be a bug.</p>
 

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