Discussion:
The input stream is not a valid binary format
(too old to reply)
Tommaso Caldarola
2007-01-12 13:56:41 UTC
Permalink
I got the following exception

System.Runtime.Serialization.SerializationException: The input stream is not a
valid binary format. The starting contents (in bytes) are:
53-79-73-74-65-6D-2E-57-65-62-2E-48-74-74-70-45-78 ... Server stack trace: at
System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser
input)... etc.

when I try to transfer a MarshalByValue object.
If I run remote server as executable (no host in IIS) I have no problem.

Scenario:

IIS 5.0, .Net 2.0
Remote object hosted in IIS
Client (WindowsForms)

Any suggest?

I post client/server config file.
----------------------

web.config

<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="false">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
<service>
<wellknown
mode="Singleton"
type="xxx.yyy, xxx"
objectUri="ApplicationServer.rem" />
</service>
</application>
</system.runtime.remoting>

--------------------
client.config

<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="false">
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
Phill W.
2007-01-12 14:36:19 UTC
Permalink
Post by Tommaso Caldarola
System.Runtime.Serialization.SerializationException: The input stream is
53-79-73-74-65-6D-2E-57-65-62-2E-48-74-74-70-45-78 ... Server stack trace: at
System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser
input)... etc.
when I try to transfer a MarshalByValue object.
If I run remote server as executable (no host in IIS) I have no problem.
IIS 5.0, .Net 2.0
Remote object hosted in IIS
Client (WindowsForms)
Well, if you translate these hexadecimal values back into readible
characters, you get ...

"System.Web.HttpEx"

... which looks the start of something nasty coming out of IIS.

Sadly, I've no idea what, though.

Regards,
Phill W.
Tommaso Caldarola
2007-01-12 14:55:09 UTC
Permalink
Post by Phill W.
Well, if you translate these hexadecimal values back into readible
characters, you get ...
"System.Web.HttpEx"
... which looks the start of something nasty coming out of IIS.
Sadly, I've no idea what, though.
With a http sniffer I get the clear message, thank you.
Joel Lyons
2007-01-13 00:03:49 UTC
Permalink
Phil is right, IIS is sending you back an html error page and the binary
formatter can't handle it. See:
http://www.dotnetconsult.co.uk/weblog/PermaLink.aspx/827189d3-ee0e-444f-b01d-bf9ce9f70f5c
(we use that solution and it works great - no sniffer required!)
Joel Lyons
Post by Tommaso Caldarola
I got the following exception
System.Runtime.Serialization.SerializationException: The input stream is
53-79-73-74-65-6D-2E-57-65-62-2E-48-74-74-70-45-78 ... Server stack trace: at
System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser
input)... etc.
when I try to transfer a MarshalByValue object.
If I run remote server as executable (no host in IIS) I have no problem.
IIS 5.0, .Net 2.0
Remote object hosted in IIS
Client (WindowsForms)
Any suggest?
I post client/server config file.
----------------------
web.config
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="false">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
<service>
<wellknown
mode="Singleton"
type="xxx.yyy, xxx"
objectUri="ApplicationServer.rem" />
</service>
</application>
</system.runtime.remoting>
--------------------
client.config
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="false">
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
Tommaso Caldarola
2007-01-13 08:19:48 UTC
Permalink
Post by Joel Lyons
Phil is right, IIS is sending you back an html error page and the binary
http://www.dotnetconsult.co.uk/weblog/PermaLink.aspx/827189d3-ee0e-444f-b01d-bf9ce9f70f5c
(we use that solution and it works great - no sniffer required!)
Oh, thanks a lot!!!

tommaso

Loading...