<p>I've got a problem where incoming SOAP messages from one particular client are being marked as invalid and rejected by our XML firewall device. It appears extra payload data is being inserted by Visual Studio; we're thinking the extra data may be causing a problem b/c we're seeing "VsDebuggerCausalityData" in these messages but not in others sent from a different client who is not having a problem. It's a starting point, anyway.</p>

<p>The question I have is how can the client remove this extra data and still run from VS? Why is VS putting it in there at all?</p>

<p>Thanks.</p>

[{'answer_id': 33312, 'author': 'Darryl Braaten', 'author_id': 1834, 'author_profile': 'https://Stackoverflow.com/users/1834', 'pm_score': 5, 'selected': True, 'text': '<p>A quick google reveals that this should get rid of it, get them to add it to the web.config or app.config for their application. </p>\n\n<pre><code>&lt;configuration&gt;\n  &lt;system.diagnostics&gt;\n    &lt;switches&gt;\n       &lt;add name="Remote.Disable" value="1" /&gt;\n    &lt;/switches&gt;\n  &lt;/system.diagnostics&gt;\n&lt;/configuration&gt; \n</code></pre>\n\n<p>The information is debug information that the receiving service can use to help trace things back to the client.  (maybe, I am guessing a little)  </p>\n\n<ul>\n<li>I have proposed a follow up <a href="https://stackoverflow.com/questions/33334/how-do-you-find-what-debug-switches-are-available-or-given-a-switch-find-out-wh">question</a> to determine were the magic switch actually comes from.</li>\n</ul>\n'}, {'answer_id': 3066595, 'author': 'ggrocco', 'author_id': 369899, 'author_profile': 'https://Stackoverflow.com/users/369899', 'pm_score': 4, 'selected': False, 'text': "<p>For remove 'VsDebuggerCausalityData' you need stop de Visual Studio Diagnostic for WCF using this command:</p>\n\n<p>VS 2008 -> c:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE>vsdiag_regwcf.exe -u\nVS 2010 -> c:\\Program Files\\Microsoft Visual Studio 10.0\\Common7\\IDE>vsdiag_regwcf.exe -u</p>\n\n<p>I hope this help you or other people.</p>\n"}, {'answer_id': 12289892, 'author': 'Jesse Chisholm', 'author_id': 1456887, 'author_profile': 'https://Stackoverflow.com/users/1456887', 'pm_score': 3, 'selected': False, 'text': '<p>Darryl\'s answer didn\'t work for me. Each developer has to do ggrocco\'s answer.</p>\n\n<p>I ended up writing a <strong>MessageInspector</strong>, and adding this code to the <strong>BeforeSendRequest</strong> method:</p>\n\n<pre><code>int limit = request.Headers.Count;\nfor(int i=0; i&lt;limit; ++i)\n{\n    if (request.Headers[i].Name.Equals("VsDebuggerCausalityData"))\n    {\n        request.Headers.RemoveAt(i);\n        break;\n    }\n}\n</code></pre>\n'}, {'answer_id': 26403141, 'author': 'Poppert', 'author_id': 598630, 'author_profile': 'https://Stackoverflow.com/users/598630', 'pm_score': 2, 'selected': False, 'text': '<p>Or use "Start without debugging" in Visual Studio.</p>\n'}, {'answer_id': 38570441, 'author': 'Gone Coding', 'author_id': 201078, 'author_profile': 'https://Stackoverflow.com/users/201078', 'pm_score': 4, 'selected': False, 'text': '<p>Based on an answer by <code>@Luiz Felipe</code> I came up with this slightly more robust solution:</p>\n\n<pre><code>var vs = client.Endpoint.EndpointBehaviors.FirstOrDefault((i) =&gt; i.GetType().Namespace == "Microsoft.VisualStudio.Diagnostics.ServiceModelSink");\nif (vs != null)\n{\n    client.Endpoint.Behaviors.Remove(vs);\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/32877', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1683/']