Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
QuestionHow to create an application that lists folders containing the most disk space? Pin
Luke Perrin7-Aug-09 0:21
Luke Perrin7-Aug-09 0:21 
AnswerRe: How to create an application that lists folders containing the most disk space? Pin
MarkB7777-Aug-09 0:49
MarkB7777-Aug-09 0:49 
AnswerRe: How to create an application that lists folders containing the most disk space? Pin
Luc Pattyn7-Aug-09 1:11
sitebuilderLuc Pattyn7-Aug-09 1:11 
AnswerRe: How to create an application that lists folders containing the most disk space? Pin
Tamer Oz7-Aug-09 2:03
Tamer Oz7-Aug-09 2:03 
QuestionConvert pcl to PDF Pin
abbd6-Aug-09 23:19
abbd6-Aug-09 23:19 
AnswerRe: Convert pcl to PDF Pin
Manas Bhardwaj6-Aug-09 23:27
professionalManas Bhardwaj6-Aug-09 23:27 
Questionoutlook sync Pin
John_276-Aug-09 23:06
John_276-Aug-09 23:06 
QuestionBinaryFormatter.Deserialization SerializationException Pin
Trapper-Hell6-Aug-09 22:41
Trapper-Hell6-Aug-09 22:41 
I have been working on this issue for a few days now and I am growing tired and desperate Sigh | :sigh:

I have made this application which sends a screenshot (Image type) to another PC. All works well on most PCs except some very few of them. Those that do not work complain of a Binary stream '0' does not contain a valid BinaryHeader.

The code is exactly the same on the working / non-working PCs. I have also attempted to run the program locally on the PCs not working, and the exact problem occurs.

The Algorithm is as follows:
- Screenshot is taken (returned as Image)
- Size of the Image is sent (to prepare a byte[] for the receiving end)
- Image is converted into a MemoryStream from BinaryFormatter.Serialize
- MemoryStream.ToArray() gets byte[] which is written on a NetworkStream

- Receiving end receives the length of the object and prepares a byte[] with that length
- Receiving end reads the data on a byte[]
- Byte[] is Deserialized to object <- Exception occurs Dead | X|


I have checked the first 50 bytes being sent and received and they are exactly identical!! D'Oh! | :doh:
It is true that the first byte is a 0 but this works with no problems at all on other systems

Why is this happening? How can I avoid this? Maybe using UnsafeDeserialize or something completely different?! Confused | :confused:

Any help is sooo greatly appreciated!!
AnswerRe: BinaryFormatter.Deserialization SerializationException Pin
Luc Pattyn7-Aug-09 0:27
sitebuilderLuc Pattyn7-Aug-09 0:27 
QuestionAn operation was attempted on something that is not a socket Pin
Vivek Vijayan6-Aug-09 21:32
Vivek Vijayan6-Aug-09 21:32 
AnswerRe: An operation was attempted on something that is not a socket Pin
Luc Pattyn7-Aug-09 0:31
sitebuilderLuc Pattyn7-Aug-09 0:31 
QuestionSystem.Net.Mail - SMTP Client - Authentication Pin
James M Buist6-Aug-09 21:20
James M Buist6-Aug-09 21:20 
AnswerRe: System.Net.Mail - SMTP Client - Authentication Pin
Manas Bhardwaj6-Aug-09 22:27
professionalManas Bhardwaj6-Aug-09 22:27 
QuestionHow to save the property of the user-defined column ? Pin
mctramp1686-Aug-09 20:18
mctramp1686-Aug-09 20:18 
AnswerRe: How to save the property of the user-defined column ? Pin
Cracked-Down6-Aug-09 20:28
Cracked-Down6-Aug-09 20:28 
QuestionWiewing Office Document in Web Browser Pin
egpuyos6-Aug-09 20:04
egpuyos6-Aug-09 20:04 
AnswerRe: Wiewing Office Document in Web Browser Pin
Mycroft Holmes6-Aug-09 20:10
professionalMycroft Holmes6-Aug-09 20:10 
AnswerRe: Wiewing Office Document in Web Browser Pin
Baeltazor7-Aug-09 0:43
Baeltazor7-Aug-09 0:43 
QuestionDifference between two date/times Pin
mjawadkhatri6-Aug-09 19:55
mjawadkhatri6-Aug-09 19:55 
AnswerRe: Difference between two date/times Pin
Vikram A Punathambekar6-Aug-09 20:15
Vikram A Punathambekar6-Aug-09 20:15 
GeneralRe: Difference between two date/times Pin
mjawadkhatri6-Aug-09 20:21
mjawadkhatri6-Aug-09 20:21 
GeneralRe: Difference between two date/times Pin
Vikram A Punathambekar6-Aug-09 20:30
Vikram A Punathambekar6-Aug-09 20:30 
GeneralRe: Difference between two date/times Pin
mjawadkhatri6-Aug-09 20:37
mjawadkhatri6-Aug-09 20:37 
AnswerRe: Difference between two date/times Pin
Luc Pattyn7-Aug-09 0:39
sitebuilderLuc Pattyn7-Aug-09 0:39 
GeneralRe: Difference between two date/times Pin
mjawadkhatri7-Aug-09 2:02
mjawadkhatri7-Aug-09 2:02 

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.