Results 1 to 2 of 2

Thread: [2.0] Deserialization via NetworkStream?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Wellington NZ
    Posts
    153

    [2.0] Deserialization via NetworkStream?

    Hi, I am trying to make a simple Client \ Server application.

    I have created 3 projects, DocumentServer, DocumentClient and DocumentLibrary

    DocumentServer accepts requests from DocumentClients and they both share common objects from DocumentLibrary

    I want to send an object, "Document" created by DocumentClient to DocumentServer, the class "Document" is Serializable and can be sent via a Network Stream to the DocumentServer

    The problem occurs when the document is Deserialized on the DocumentServer. I get the following error....

    System.Runtime.Serialization.SerializationException: Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization.

    Any ideas?

    Thanks

    Rohan
    You dont need eyes to see, you need vision.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2.0] Deserialization via NetworkStream?

    I think we'd need to see the send and receive code, unless someone else has encountered this specific error before.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width