in

The SoftTeq Community Site

SoftTeq blogs

Alastair Waddell

"The server committed a protocol violation"

I had a very interesting problem to debug today.

An external company who are doing some contract work for us has been getting the error "The server committed a protocol violation" whist trying to communicate to one of our web services. They have a permanent VPN link to us. I got the call after they had spent several days trying to get things working, and they emailed me various links to FAQ's from around the place. It seems as though there 000's of hits when searching, but nothing worked. We knew the header was being changed, but by what and why?

I am very familiar with tools such as Fiddler and ieHTTPHeaders which are great for debugging and tweaking performance, but in this case they couldn’t help when the exception was thrown.

Then as if a light was turned on... why don’t we use the logging that asp.net has build into it. I added the code below to my web.config ran the application, and voila - had a rather lengthy log file sitting in my temp directory. Closer inspection revealed there was a nasty proxy server in the way. By-passing it for this site has things running as they should be

Now just need to find out what the proxy server is doing...but that goes to somebody else to resolve.

Alastair

<system.diagnostics>
    <sources>
      <source name="System.Net">
        <listeners>
          <add name="System.Net"/>
        </listeners>
      </source>
      <source name="System.Net.Sockets">
        <listeners>
          <add name="System.Net"/>
        </listeners>
      </source>
  
    </sources>
    <switches>
      <add name="System.Net" value="Verbose" />
      <add name="System.Net.Sockets" value="Verbose" />
   
    </switches>
    <sharedListeners>
      <add name="System.Net"
           type="System.Diagnostics.TextWriterTraceListener"
           initializeData="c:\temp\Webtraffic.log" />
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add
Copyright SoftTeq 2007-2009
Powered by Community Server (Non-Commercial Edition), by Telligent Systems