468,784 Members | 1,573 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,784 developers. It's quick & easy.

If my System.IO.StreamWriter Write method throws "The specified network name is no longer available." and I try to Dispose or Close it in the finaly clause the close or dispose method just throws "The specified network name is no longe

If my System.IO.StreamWriter Write method throws "The specified network name
is no longer available." and I try to Dispose or Close it in the finaly
clause the close or dispose method just throws "The specified network name
is no longer available." again. how to clean this up? after this the stream
writer is stuck connected until i restart my process.
Sep 8 '05 #1
3 3680
Daniel,

Did you already try the "flush" method

http://msdn.microsoft.com/library/de...FlushTopic.asp

I hope this helps,

Cor
Sep 8 '05 #2
Disposing and Closing both call Flush for you.

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
Daniel,

Did you already try the "flush" method

http://msdn.microsoft.com/library/de...FlushTopic.asp
I hope this helps,

Cor

Sep 8 '05 #3
You could try closing the stream first.

Please read Jon's post on how to post on Usenet.

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
If my System.IO.StreamWriter Write method throws "The specified network name is no longer available." and I try to Dispose or Close it in the finaly
clause the close or dispose method just throws "The specified network name
is no longer available." again. how to clean this up? after this the stream writer is stuck connected until i restart my process.

Sep 8 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Alex Nordhus | last post: by
10 posts views Thread by newbie | last post: by
5 posts views Thread by engsolnorm | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.