On Fri, 07 Dec 2007 13:52:47 -0800, email@example.com
No, you didn't. A complete example could be compiled and run without any
additional effort on anyone's part. Your code snippet doesn't even come
close to that. And note that for networked code, it's even harder to
provide a complete code sample, because you need both ends of the
communication link to be represented.
That wouldn't be hard to be, seeing as how I'm not frustrated at all about
it. I'm just trying to get you to clarify or explain seemingly
inconsistent or vague statements. It doesn't bother me at all whether it
works one time and/or not another. But there's no way to offer advice
without getting to the bottom of the incomplete, inconsistent problem
Since I prefer to offer advice than to give up on someone, I'm trying to
provide information that will help you get the answers you want.
last year there have been only 24 posts _total_ containing both the words
newsgroup, never mind one that gets over a hundred posts a day. And
that's assuming that every single one of those posts represents a new
question about the specific problem you're talking about, which is clearly
not the case (in fact most of those posts are either replies to a question
about the specific problem, or they aren't even about the same problem).
The point is that absent any sort of complete question, there's no way
anyone else could have known it had something to do with the timeout
Frankly, I'm still not convinced your problem is actually _caused by_ the
timeout, nor necessarily solved by disposing your object. It could be,
but if so you've haven't provided correct or complete enough details to
It would not at all be unusual for some time-consuming operation to not
return until the end of a given timeout period. In such an event, the
operation may not actually be successful, providing incomplete data or
some error indicating the timeout occurred. (For example, suppose all of
the data was sent, but the connection closure failed, resulting in a
failure to detect that the data, all of which was actually sent, was in
fact complete). But the whole point of a timeout is to allow something
that might take awhile to treat lack of completion before a certain time
as being completed anyway (with or without an error).
Especially given your description that adding a dispose of the object
_after_ the code that is presumably causing the delay, it's hard to
imagine how your failure to properly dispose of the object could lead to
the problem. It _might_ be educational for you to provide a reference to
one of the examples you say describes the exact same problem and uses the
proper disposal of the object as the solution. Be sure to explain why
your situation is exactly the same as the one you're referencing.
But again, without an actual concise-but-complete example there's no way
for anyone to say for sure. Maybe your problem is related to the timeout,
maybe it's not. Maybe it's fixed by the dispose, maybe it's not. It's
entirely possible that whatever failures occur are just because the
communications with the remote host are not reliable. This would cause a
delay of the timeout period as well as would be intermittent in nature,
rather than reliably reproducible. It's at least as good an explanation
as anything else proposed here.
I don't think you are "providing some bull-story". I take as granted that
whatever people post here is truthful; there's practically never any
motivation for it not to be and there's certainly no reason to assume that
But I do think that you aren't looking at the problem in the right way.
You aren't providing anyone here with enough information to answer the
question, you seem to be taking personally the lack of useful answers or
information regarding a problem that hasn't even been well-defined yet,
and you seem unwilling to accept the possibility that the problem is
simply due to operator error, rather than some failing in .NET or in those
who try to offer advice about the use of .NET.
Even if the problem _is_ resolved by properly disposing the object,
there's no one except yourself to blame for not disposing it. Why try to
point the finger somewhere else? And by focusing on your perceived
solution to the problem rather than providing the details required to
truly analyze the problem, you guarantee that no other person will be able
to provide any useful advice on that specific problem (even if, as you can
see above, a person feels that there's lots of advice to be given more
generally :) ).