I have a three tiered WinForm application that uses Microsoft .NET Remoting Framework via a HTTP channel formatted in binary to communicate commands from the client to the server. Every so often when I am making changes to the system I will received the following error:

BinaryFormatter Version incompatibility. Expected Version 1.0. Received Version 1634552164.1866884455

I can’t begin to tell you how much I hate this error. It is completely useless. I would rather the error message said “Unknown error” instead of miss leading you into thinking there is something more meaningful or helpful in the message. This message simply tells you that there is a problem that needs to be fixed. After many battles with this particular error message I came across a useful trick. I use the following XML in an configuration file the .Net remoting:

<configuration>
  <system.runtime.remoting>
    <application>
      <channels>
        <channel ref="http" useDefaultCredentials="true">
          <clientProviders>
            <formatter ref="binary" />
          </clientProviders>
        </channel>
      </channels>
    </application>
  </system.runtime.remoting>
</configuration>

To receive a meaningful error message I change the binary format to soap by changing <formatter ref=”binary” /> to <formatter ref=”soap” />. SOAP error messages are descriptive and can tell you what is going on with the connection. Once I resolve the issue, I switch the formatter back to binary and my application magically works again.

For more information about .Net remoting visit http://msdn.microsoft.com/en-us/library/ms973864.aspx.

Share.

About Author

Christine Weaver has been the technical lead on projects designing, developing, deploying, supporting, and delivering solutions for SharePoint since 2003. Christine’s knowledge and experience leans heavily on her 10+ years as a software consultant and from being a Microsoft certified professional. Christine has been a regular presenter at TechDays Canada and runs the Halifax SharePoint User Group.

Leave A Reply