HighTechTalks DotNet Forums  

The input stream is not a valid binary format

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss The input stream is not a valid binary format in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Tommaso Caldarola
 
Posts: n/a

Default The input stream is not a valid binary format - 01-12-2007 , 08:56 AM






I got the following exception

System.Runtime.Serialization.SerializationExceptio n: 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.Ser ializationHeaderRecord.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>


Reply With Quote
  #2  
Old   
Phill W.
 
Posts: n/a

Default Re: The input stream is not a valid binary format - 01-12-2007 , 09:36 AM






Tommaso Caldarola wrote:

Quote:
System.Runtime.Serialization.SerializationExceptio n: 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.Ser ializationHeaderRecord.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)
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.


Reply With Quote
  #3  
Old   
Tommaso Caldarola
 
Posts: n/a

Default Re: The input stream is not a valid binary format - 01-12-2007 , 09:55 AM



Phill W. wrote:

Quote:
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.



Reply With Quote
  #4  
Old   
Joel Lyons
 
Posts: n/a

Default Re: The input stream is not a valid binary format - 01-12-2007 , 07:03 PM



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/weblo...d-bf9ce9f70f5c
(we use that solution and it works great - no sniffer required!)
Joel Lyons

"Tommaso Caldarola" <ilbecchino (AT) lcimitero (DOT) it> wrote

Quote:
I got the following exception

System.Runtime.Serialization.SerializationExceptio n: 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.Ser ializationHeaderRecord.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




Reply With Quote
  #5  
Old   
Tommaso Caldarola
 
Posts: n/a

Default Re: The input stream is not a valid binary format - 01-13-2007 , 03:19 AM



Joel Lyons wrote:

Quote:
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/weblo...d-bf9ce9f70f5c
(we use that solution and it works great - no sniffer required!)
Oh, thanks a lot!!!

tommaso



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.