Click here to Skip to main content
16,005,682 members
Home / Discussions / C#
   

C#

 
GeneralConverting projects Pin
Anonymous9-Nov-04 17:56
Anonymous9-Nov-04 17:56 
GeneralRe: Converting projects Pin
yoaz9-Nov-04 20:10
yoaz9-Nov-04 20:10 
GeneralRe: Converting projects Pin
Stefan Troschuetz9-Nov-04 21:29
Stefan Troschuetz9-Nov-04 21:29 
GeneralProblem with arraylist Pin
amalatsliit9-Nov-04 16:59
amalatsliit9-Nov-04 16:59 
GeneralRe: Problem with arraylist Pin
Corinna John9-Nov-04 19:38
Corinna John9-Nov-04 19:38 
GeneralHelp me please!!! Pin
momer9-Nov-04 15:47
momer9-Nov-04 15:47 
GeneralRe: Help me please!!! Pin
szyusong3-Jul-09 6:06
szyusong3-Jul-09 6:06 
GeneralSending Serialized data across a socket between two programs Pin
Guinness4Strength9-Nov-04 9:10
Guinness4Strength9-Nov-04 9:10 
I'm writing a Client/Server app that uses RSA encryption. I'm triing to serialize an entire class to send across the socket. The class contains 6 byte arrays which hold encryption data.
I can serialize and send just fine, but when I receive the data and try to deserialise it I get the following error:

Decrypt: Cannot find the assembly RSASend, Version=1.0.1774.26988, Culture=neutral, PublicKeyToken=null.

Well this is of course due to the fact that the two Assemblies I'm using are different.
Is there any way to avoid this problem ?
Perhaps a better way to send this class over the socket ?

Here is my de/serialization code:
public byte [] Serialize(CipherMessage Data)
{
	try
	{
		MemoryStream sms = new MemoryStream();
		BinaryFormatter format = new BinaryFormatter();
		byte [] Buff=null;
		//serialize the message class
		format.Serialize(sms,Data);
		Buff = new byte[(int)sms.Length];
		sms.Seek(0,SeekOrigin.Begin);
		sms.Read(Buff,0,(int)sms.Length);
		return Buff;
	}
	catch (Exception Err)
	{
		CryptoError="Serialize Error: "+Err.Message;
		return null;
	}
}

public CipherMessage Deserialize(byte [] Data)
{
	BinaryFormatter format = new BinaryFormatter();
	MemoryStream ms = new MemoryStream(Data);
	ms.Seek(0,SeekOrigin.Begin);
	CipherMessage message = (CipherMessage)format.Deserialize(ms);
	ms.Close();
	return message;
}

Generaltesting for equality Pin
John L. DeVito9-Nov-04 8:58
professionalJohn L. DeVito9-Nov-04 8:58 
GeneralRe: testing for equality Pin
Steve Maier9-Nov-04 9:40
professionalSteve Maier9-Nov-04 9:40 
GeneralRe: testing for equality Pin
John L. DeVito9-Nov-04 10:13
professionalJohn L. DeVito9-Nov-04 10:13 
Generalc programming Pin
kp20dub9-Nov-04 7:40
kp20dub9-Nov-04 7:40 
GeneralRe: c programming Pin
DougW489-Nov-04 20:55
DougW489-Nov-04 20:55 
GeneralRemove Video question.. Pin
OMalleyW9-Nov-04 7:05
OMalleyW9-Nov-04 7:05 
GeneralC# FTP Client - a part of received message missing Pin
miki_wawa9-Nov-04 6:08
sussmiki_wawa9-Nov-04 6:08 
GeneralSimple Parse a simple HTTP Response Pin
berlinbrown9-Nov-04 5:58
berlinbrown9-Nov-04 5:58 
GeneralRe: Simple Parse a simple HTTP Response Pin
Stefan Troschuetz9-Nov-04 21:49
Stefan Troschuetz9-Nov-04 21:49 
GeneralRe: Simple Parse a simple HTTP Response Pin
berlinbrown10-Nov-04 2:14
berlinbrown10-Nov-04 2:14 
GeneralRe: Simple Parse a simple HTTP Response Pin
Stefan Troschuetz10-Nov-04 2:26
Stefan Troschuetz10-Nov-04 2:26 
QuestionIs there any function in c#.net like "_i64toa? Pin
FlyToYou9-Nov-04 4:47
FlyToYou9-Nov-04 4:47 
AnswerRe: Is there any function in c#.net like "_i64toa? Pin
Stefan Troschuetz9-Nov-04 4:57
Stefan Troschuetz9-Nov-04 4:57 
AnswerRe: Is there any function in c#.net like "_i64toa? Pin
Tom Larsen9-Nov-04 5:02
Tom Larsen9-Nov-04 5:02 
GeneralGive up now Pin
leppie9-Nov-04 4:12
leppie9-Nov-04 4:12 
GeneralRe: student request Pin
DougW489-Nov-04 21:13
DougW489-Nov-04 21:13 
Generalfile execution Pin
Pyro Joe9-Nov-04 3:58
Pyro Joe9-Nov-04 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.