Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 510855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:09:23+00:00 2026-05-13T07:09:23+00:00

I have a UDP server that I have being trying to send structures using

  • 0

I have a UDP server that I have being trying to send structures using send() method.. No luck so far…

This is what I am using:

H,G are structures…

sender side:

IFormatter formatter = new BinaryFormatter();
MemoryStream stream = new MemoryStream();
formatter.Serialize(stream, H);
Byte[] buffer = stream.ToArray();
stream.Close();

and on the receiver side:

IFormatter formatter = new BinaryFormatter();
Stream s = new MemoryStream(buffer.Data);
ClientAnswerStruct G = (ClientAnswerStruct)formatter.Deserialize(s);
s.Close();
MessageBox.Show(G.name);

But I get this error:

 Unable to find assembly 'UdpClientSample, Version=1.0.0.0, Culture=neutral,    PublicKeyToken=null'.

‘UdpClientSample’ happens to be the title of the client program that is sending the data to the server… So I’m wondering if it takes more than serialization to be able so send a structure through UDP connection?

Is there a breakthrough out there that explains what Iamamac says?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:09:23+00:00Added an answer on May 13, 2026 at 7:09 am

    I didn’t see the whole code, but I guess the server and client is two different executable files, and the ClientAnswerStruct class is defined twice in both sides. When the receiver deserialize the data, it tries to reconstruct a ClientAnswerStruct object but can not find its definition (Notice that it is defined on the sender’s side. Although on the receiver’s side there is a class named ClientAnswerStruct, but they are not the same).

    The right way to do this is define the ClientAnswerStruct class in a standalone class library, and let the server and client code include it (‘add reference’ in C# terminology).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set up a UDP client/server model that can send string messages to
I have a UDP server that reflects every ping message it receives (this works
I have a written a very simple UDP Server using Netty - it quite
I have a problem with a Sender and a Server UDP. The SenderUDP sends
I have a simple UDP server that creates a new thread for processing incoming
After many hours, I have discovered that the given udp server needs the following
I am trying to setup a simple UDP client and server using Ruby. The
I'm trying to set up a very simple UDP socket server with python that
I have a server that waits for incoming client messages and uses UDP. When
Here's my trouble: I have a udp class that allow me to send and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.