Click here to Skip to main content
15,885,985 members
Home / Discussions / C#
   

C#

 
GeneralRe: Stream closes while reading a socket Pin
Paulo Zemek22-Nov-09 7:44
mvaPaulo Zemek22-Nov-09 7:44 
AnswerRe: Stream closes while reading a socket Pin
Luc Pattyn20-Nov-09 6:27
sitebuilderLuc Pattyn20-Nov-09 6:27 
GeneralRe: Stream closes while reading a socket Pin
joana.simoes23-Nov-09 0:13
joana.simoes23-Nov-09 0:13 
GeneralRe: Stream closes while reading a socket Pin
joana.simoes23-Nov-09 0:39
joana.simoes23-Nov-09 0:39 
GeneralRe: Stream closes while reading a socket Pin
Luc Pattyn23-Nov-09 0:43
sitebuilderLuc Pattyn23-Nov-09 0:43 
GeneralRe: Stream closes while reading a socket Pin
joana.simoes23-Nov-09 3:56
joana.simoes23-Nov-09 3:56 
NewsRe: Stream closes while reading a socket Pin
joana.simoes23-Nov-09 6:43
joana.simoes23-Nov-09 6:43 
AnswerRe: Stream closes while reading a socket Pin
dojohansen23-Nov-09 11:15
dojohansen23-Nov-09 11:15 
If this is happening a lot there probably is some sort of issue with the code, but it does seem a bit odd. If there is any event available on the stream when it's state changes you could try to subscribe to the event and dump the thread ID and Environment.StackTrace to debug output (or a file or whatever); that might provide some clues perhaps. (If there is no such event you may be able to achieve the same by writing a stream class that wraps the real stream - at least it'll be easy to identify anything that explicitly closes the stream then.)

I'm wondering how often dropped connections do occur under normal circumstances. My browser will sometimes show an error page (when my connection is particularly bad!) informing me that "the remote server closed the connection" or "stopped responding" but I don't know whether or not it retries any requests before giving up.

You could probably employ that as a strategy, to automatically retry a request say 2 times in the event of a dropped connection while obtaining the response. Just make sure you don't do it for POST requests; it would be a pity if the user's order to buy $5K of some stock resulted in buying $15K because the request was automatically retried... Come to think of it, that *could* happen with any request, it's certainly possible to perform such things based on a querystring alone; however, doing such a thing would be a clear violation of HTTP protocol guidelines!
NewsRe: Stream closes while reading a socket Pin
joana.simoes24-Nov-09 1:37
joana.simoes24-Nov-09 1:37 
QuestionExcel Formatting. Pin
FEMDEV20-Nov-09 4:47
FEMDEV20-Nov-09 4:47 
AnswerRe: Excel Formatting. Pin
toby3120-Nov-09 8:16
toby3120-Nov-09 8:16 
GeneralRe: Excel Formatting. Pin
FEMDEV22-Nov-09 22:44
FEMDEV22-Nov-09 22:44 
QuestionSQLite Pin
jashimu20-Nov-09 3:26
jashimu20-Nov-09 3:26 
AnswerRe: SQLite Pin
MeLight20-Nov-09 3:35
MeLight20-Nov-09 3:35 
GeneralRe: SQLite Pin
jashimu20-Nov-09 4:44
jashimu20-Nov-09 4:44 
GeneralRe: SQLite Pin
Pete O'Hanlon20-Nov-09 5:04
mvePete O'Hanlon20-Nov-09 5:04 
GeneralRe: SQLite Pin
PIEBALDconsult20-Nov-09 8:04
mvePIEBALDconsult20-Nov-09 8:04 
GeneralRe: SQLite Pin
jashimu20-Nov-09 8:09
jashimu20-Nov-09 8:09 
AnswerRe: SQLite Pin
PIEBALDconsult20-Nov-09 3:35
mvePIEBALDconsult20-Nov-09 3:35 
AnswerRe: SQLite Pin
Md. Marufuzzaman20-Nov-09 4:34
professionalMd. Marufuzzaman20-Nov-09 4:34 
QuestionSimulating a key press problem Pin
MeLight20-Nov-09 3:17
MeLight20-Nov-09 3:17 
AnswerRe: Simulating a key press problem Pin
Dave Kreskowiak20-Nov-09 6:59
mveDave Kreskowiak20-Nov-09 6:59 
GeneralRe: Simulating a key press problem Pin
MeLight20-Nov-09 7:43
MeLight20-Nov-09 7:43 
QuestionCOM GUID Pin
gioviro20-Nov-09 2:40
gioviro20-Nov-09 2:40 
QuestionNot able of saving in App.config Pin
FJJCENTU20-Nov-09 2:07
FJJCENTU20-Nov-09 2:07 

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.