Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: embedded chm Pin
bisquic22-Mar-04 3:05
bisquic22-Mar-04 3:05 
GeneralRe: embedded chm Pin
Heath Stewart22-Mar-04 3:14
protectorHeath Stewart22-Mar-04 3:14 
QuestionHow can I know if CapsLock is pressed Pin
Alexandr_I20-Mar-04 11:23
Alexandr_I20-Mar-04 11:23 
AnswerRe: How can I know if CapsLock is pressed Pin
John Fisher20-Mar-04 12:12
John Fisher20-Mar-04 12:12 
GeneralRe: How can I know if CapsLock is pressed Pin
Heath Stewart20-Mar-04 13:32
protectorHeath Stewart20-Mar-04 13:32 
AnswerRe: How can I know if CapsLock is pressed Pin
Heath Stewart20-Mar-04 13:34
protectorHeath Stewart20-Mar-04 13:34 
GeneralRe: How can I know if CapsLock is pressed Pin
Alexandr_I21-Mar-04 4:30
Alexandr_I21-Mar-04 4:30 
Generalc# newbie serialization problem Pin
dorutzu20-Mar-04 11:22
dorutzu20-Mar-04 11:22 
Hi,

I'm just starting to learn C#(and I like it) and .NET Framework, and I stared with this: I want to make a chat application. Basically, I have a server and a client, connected via sockets (all works just fine). Now, I would like the client to send some info to the server -> a serialized object (because there are many types of values in this object). The problem is that the server and the client are not the same application, and thus, deserialization doesn't work (or at least, I couldn't make it work...maybe you can help here).
This is the code I use for serialization:

MemoryStream ms = new MemoryStream();
StreamingContext stmCtx = new StreamingContext(StreamingContextStates.CrossMachine | StreamingContextStates.Persistence);
BinaryFormatter bf = new BinaryFormatter(null, stmCtx);
bf.AssemblyFormat = FormatterAssemblyStyle.Simple;
bf.TypeFormat = FormatterTypeStyle.TypesWhenNeeded;
bf.Serialize(ms, negociate_struct);


...and then I send ms over the network. Now, serialization is basicaly ok (because if I deserialize here ms, is works fine), but on the server I got this IOException : "File or assembly name RCClient, or one of its dependencies, was not found." RCClient is my client application name. I also saved my stream to a file, and got something like:
"  ˙˙˙˙  RCClient %NegociationStructures.NegociateStruct
SenderTypePacketNo
NPResponse   xxx
" It's obvious my server application doesn't know who RCClient is.

I figure the problem is either with setting the BinaryFormatter, or I use the wrong tool for the job. Also, I can't use SOAP serialization, because I noticed that the stream is much larger, and I need as much speed as possible (this should eventually develop into a video chat & stuff).

I hope I made my problem clear, and I would appreciate any help or hint.

Thank you in advance,
Doru K.
GeneralRe: c# newbie serialization problem Pin
John Fisher20-Mar-04 12:15
John Fisher20-Mar-04 12:15 
GeneralRe: c# newbie serialization problem Pin
Heath Stewart20-Mar-04 13:24
protectorHeath Stewart20-Mar-04 13:24 
GeneralThank you John, thank you Stewart Pin
dorutzu21-Mar-04 1:58
dorutzu21-Mar-04 1:58 
Generalsimple Transparent problem Pin
Snowjim20-Mar-04 6:31
Snowjim20-Mar-04 6:31 
GeneralRe: simple Transparent problem Pin
Nick Parker20-Mar-04 7:20
protectorNick Parker20-Mar-04 7:20 
GeneralRe: simple Transparent problem Pin
Snowjim20-Mar-04 23:33
Snowjim20-Mar-04 23:33 
QuestionTaskbar informations? Pin
Morten Kristensen20-Mar-04 5:27
Morten Kristensen20-Mar-04 5:27 
AnswerRe: Taskbar informations? Pin
kaptaintens20-Mar-04 10:04
kaptaintens20-Mar-04 10:04 
GeneralRe: Taskbar informations? Pin
Morten Kristensen21-Mar-04 1:52
Morten Kristensen21-Mar-04 1:52 
GeneralRe: Taskbar informations? Pin
kaptaintens21-Mar-04 7:53
kaptaintens21-Mar-04 7:53 
GeneralBest way to save state (Windows Forms) Pin
profoundwhispers20-Mar-04 4:29
profoundwhispers20-Mar-04 4:29 
GeneralRe: Best way to save state (Windows Forms) Pin
Heath Stewart20-Mar-04 4:50
protectorHeath Stewart20-Mar-04 4:50 
GeneralRe: Best way to save state (Windows Forms) Pin
Dave Kreskowiak20-Mar-04 5:49
mveDave Kreskowiak20-Mar-04 5:49 
GeneralRe: Best way to save state (Windows Forms) Pin
profoundwhispers20-Mar-04 22:35
profoundwhispers20-Mar-04 22:35 
GeneralWith MDI App child form Activated event to working Pin
Inpreet Singh20-Mar-04 4:09
Inpreet Singh20-Mar-04 4:09 
GeneralWith MDI App child form Activated event to working Pin
Anonymous20-Mar-04 4:05
Anonymous20-Mar-04 4:05 
Questionhow to capture a screen on a remote pc ? Pin
fu020-Mar-04 1:21
fu020-Mar-04 1:21 

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.