Monday, December 29, 2008

System.RunTime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-

System.RunTime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-6C-3E-0D-0A-20-20-20-20-3C-68-65-61-64 ...

This is the Remoting exception IIS was consistently giving me after a deep search. The search was returning some mammoth blob's and failing after a few minutes.

I thought it might be an IIS error, sure enough after firing up TCPTrace and sniffing around, I found


HTTP/1.1 100 Continue
Server: ASP.NET Development Server/9.0.0.0
Date: Sun, 28 Dec 2008 23:52:31 GMT
Content-Length: 0

HTTP/1.1 500 Internal Server Error
Server: ASP.NET Development Server/9.0.0.0
Date: Sun, 28 Dec 2008 23:54:35 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 2549
Connection: Close

--snip html
Request timed out.
--snip html

So rather than throwing a relevant HTTP response code, we get a html error page that can't be serialized. Hopefully this saves fellow insane technologists a little time.