Click here to Skip to main content
15,891,700 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Delete In Use File Pin
Giorgi Dalakishvili13-Sep-08 4:23
mentorGiorgi Dalakishvili13-Sep-08 4:23 
QuestionSecuring DLL's Pin
Member 40066484-Sep-08 1:11
Member 40066484-Sep-08 1:11 
AnswerRe: Securing DLL's Pin
Greg Olmstead9-Sep-08 9:21
Greg Olmstead9-Sep-08 9:21 
QuestionProblem with encoding strings when exporting data to xml Pin
Oshtri Deka3-Sep-08 22:19
professionalOshtri Deka3-Sep-08 22:19 
QuestionWebBrowser component - avoid loading pictures Pin
Jan Donat2-Sep-08 2:47
Jan Donat2-Sep-08 2:47 
AnswerRe: WebBrowser component - avoid loading pictures Pin
Pete O'Hanlon2-Sep-08 3:37
mvePete O'Hanlon2-Sep-08 3:37 
GeneralRe: WebBrowser component - avoid loading pictures Pin
Jan Donat2-Sep-08 23:21
Jan Donat2-Sep-08 23:21 
Questionsending Structures over network - C#, .NET Pin
belagizi1-Sep-08 9:02
belagizi1-Sep-08 9:02 
I have a problem deserializing a structure on the server side while I can deserialize it fine on the client side. Not sure why. Comments please
Client code (MyTxBuff is a structure of mixed data types):

if (SendStruct(ref MyTxBuff, ref dataArray) == true)
{

Stream stm = tcpclnt.GetStream();

stm.Write(dataArray, 0, dataArray.Length);

Console.Write("sent fine");

// deserialize
// dataArray is in the stream stm
// define another stream that contains the dataArray buffer.
Stream stream2 = new MemoryStream(dataArray);
// now define a formatter
IFormatter formatter = new BinaryFormatter();

// but create first a structure to hold the deserialized data
TxBuffer1 myTx1 = new TxBuffer1();
// deserialize the stream
myTx1 = (TxBuffer1)formatter.Deserialize(stream2);
On the client sied, myTX reads the expected values.

On the Server side I receive dataArray values into bytesRead array (identical values on client and server). I use the same de-serialization code on the server side but I get exception. Bot data arrays are of the same dimensions. The server code is :

byte[] bytesRead = new byte[1024];

int k = Socket1.Receive(bytesRead);

// deserialize
// define another stream that contains the bytesRead buffer.
Stream stream2 = new MemoryStream(bytesRead);
// now define a formatter
IFormatter formatter = new BinaryFormatter();

// but create first a structure to hold the deserialized data
TxBuffer1 myTx1 = new TxBuffer1();
// deserialize the stream
myTx1 = (TxBuffer1)formatter.Deserialize(stream2);
AnswerRe: sending Structures over network - C#, .NET [modified] Pin
Mark Salsbery2-Sep-08 7:52
Mark Salsbery2-Sep-08 7:52 
QuestionFather class in how to use the special sub-category of type [modified] Pin
huangrongchuan31-Aug-08 22:03
huangrongchuan31-Aug-08 22:03 
AnswerDon't Cross Post Pin
Paul Conrad1-Sep-08 13:02
professionalPaul Conrad1-Sep-08 13:02 
GeneralRe: Don't Cross Post Pin
huangrongchuan1-Sep-08 15:58
huangrongchuan1-Sep-08 15:58 
QuestionGetting Base Score for Vista with .NET Pin
Last Attacker31-Aug-08 21:02
Last Attacker31-Aug-08 21:02 
QuestionGetting a sound to trigger an event in .net Pin
shark_scott30-Aug-08 13:47
shark_scott30-Aug-08 13:47 
QuestionChange default framework version that is used Pin
Winkles29-Aug-08 19:38
Winkles29-Aug-08 19:38 
AnswerRe: Change default framework version that is used Pin
Scott Dorman30-Aug-08 3:55
professionalScott Dorman30-Aug-08 3:55 
GeneralRe: Change default framework version that is used Pin
Winkles31-Aug-08 18:18
Winkles31-Aug-08 18:18 
GeneralRe: Change default framework version that is used Pin
Scott Dorman31-Aug-08 18:54
professionalScott Dorman31-Aug-08 18:54 
GeneralRe: Change default framework version that is used Pin
Winkles1-Sep-08 7:47
Winkles1-Sep-08 7:47 
GeneralRe: Change default framework version that is used Pin
Scott Dorman2-Sep-08 4:20
professionalScott Dorman2-Sep-08 4:20 
AnswerRe: Change default framework version that is used Pin
Thomas Stockwell30-Aug-08 14:37
professionalThomas Stockwell30-Aug-08 14:37 
QuestionOdd graphical problem with custom column/cell/control for DataGridView Pin
Gregory Gadow29-Aug-08 11:37
Gregory Gadow29-Aug-08 11:37 
QuestionMissing Framework files. Pin
Ray Clanan29-Aug-08 4:16
Ray Clanan29-Aug-08 4:16 
AnswerRe: Missing Framework files. Pin
Tony Richards30-Aug-08 0:31
Tony Richards30-Aug-08 0:31 
GeneralRe: Missing Framework files. Pin
Ray Clanan1-Sep-08 17:24
Ray Clanan1-Sep-08 17:24 

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.