Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
AnswerRe: How I Can Design this Form ? Pin
Ed.Poore12-Mar-06 4:59
Ed.Poore12-Mar-06 4:59 
GeneralRe: How I Can Design this Form ? Pin
mm31012-Mar-06 8:59
mm31012-Mar-06 8:59 
GeneralRe: How I Can Design this Form ? Pin
Luis Alonso Ramos12-Mar-06 17:35
Luis Alonso Ramos12-Mar-06 17:35 
QuestionIIS Access denies Pin
mohdmeraj12-Mar-06 3:46
mohdmeraj12-Mar-06 3:46 
AnswerRe: IIS Access denies Pin
Dave Kreskowiak12-Mar-06 16:28
mveDave Kreskowiak12-Mar-06 16:28 
AnswerRe: IIS Access denies Pin
Luis Alonso Ramos12-Mar-06 17:38
Luis Alonso Ramos12-Mar-06 17:38 
QuestionGZipStream, CryptoStream and NetworkStream interaction Pin
Marc Clifton12-Mar-06 2:59
mvaMarc Clifton12-Mar-06 2:59 
AnswerRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Ed.Poore12-Mar-06 4:54
Ed.Poore12-Mar-06 4:54 
I havn't had any experience with this (I'll try it out though when I get the chance which is god knows when Smile | :) ).

My guess is that the GZip compression method needs to have all the data in a buffer before it can finish compressing. The cryptostream may require the same thing although I'm not sure why.

As for GZipStream closing the network stream that is bizarre compared to the other streams because I've in the past opened a file-stream wrote some data using the FileStream, opened a StringWriter on the FileStream and wrote some data, closed it, opened a BinaryWriter and done the same thing. (I think, can't remember clearly).

If the MemoryStream method works then I'd use that if you're simply plugging out a pile of data, reading a response and then plugging out more.

Alternatively you could use some of the encryption classes in the System.Security namespace which work on byte arrays.

Just had a look in Reflector @ System.IO.Compression.GZipStream, it doesn't override the Close, neither does the DeflateStream which is what GZipStream is a wrapper around, so when you call Close it's actually calling close on the stream itself.

One possible solution looks like you may be able to call GZipStream.BaseStream.Close which shouldn't affect the network stream, only the DeflateStream.

Take a look in reflector and you'll (hopefully) see what I mean

Ed
GeneralRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Marc Clifton12-Mar-06 7:14
mvaMarc Clifton12-Mar-06 7:14 
GeneralRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Ed.Poore12-Mar-06 7:40
Ed.Poore12-Mar-06 7:40 
GeneralRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Marc Clifton12-Mar-06 7:44
mvaMarc Clifton12-Mar-06 7:44 
GeneralRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Ed.Poore12-Mar-06 7:51
Ed.Poore12-Mar-06 7:51 
GeneralRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Marc Clifton12-Mar-06 10:28
mvaMarc Clifton12-Mar-06 10:28 
GeneralRe: GZipStream, CryptoStream and NetworkStream interaction Pin
Ed.Poore12-Mar-06 11:11
Ed.Poore12-Mar-06 11:11 
QuestionConstructors Pin
AJ12312-Mar-06 1:58
AJ12312-Mar-06 1:58 
AnswerRe: Constructors Pin
Colin Angus Mackay12-Mar-06 2:11
Colin Angus Mackay12-Mar-06 2:11 
GeneralRe: Constructors Pin
AJ12312-Mar-06 2:31
AJ12312-Mar-06 2:31 
QuestionTransperent window Pin
NaNg1524112-Mar-06 0:37
NaNg1524112-Mar-06 0:37 
AnswerRe: Transperent window Pin
Robin Panther12-Mar-06 2:48
Robin Panther12-Mar-06 2:48 
GeneralRe: Transperent window Pin
NaNg1524112-Mar-06 6:09
NaNg1524112-Mar-06 6:09 
AnswerRe: Transperent window Pin
Luis Alonso Ramos12-Mar-06 17:42
Luis Alonso Ramos12-Mar-06 17:42 
AnswerRe: Transperent window Pin
Luis Alonso Ramos13-Mar-06 9:52
Luis Alonso Ramos13-Mar-06 9:52 
QuestionPropertyGrid Mouse Events not behaving Pin
hype_rides12-Mar-06 0:06
hype_rides12-Mar-06 0:06 
AnswerRe: PropertyGrid Mouse Events not behaving Pin
Ed.Poore12-Mar-06 4:42
Ed.Poore12-Mar-06 4:42 
QuestionDataGrid & ListView Pin
mehrdadc4811-Mar-06 20:33
mehrdadc4811-Mar-06 20:33 

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.