PC Review


Reply
Thread Tools Rate Thread

what can cause System.IO.IOException besides for HD errors?

 
 
Zytan
Guest
Posts: n/a
 
      8th May 2007
I got a System.IO.IOException in my app on another computer, so I
couldn't debug it. I don't think it was a HD error. What else could
throw this? Could it be from reading a webpage from the internet
through a stream?

Zytan

 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      8th May 2007
Zytan <(E-Mail Removed)> wrote:
> I got a System.IO.IOException in my app on another computer, so I
> couldn't debug it. I don't think it was a HD error. What else could
> throw this? Could it be from reading a webpage from the internet
> through a stream?


Well, what was the message from the IO exception?

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      9th May 2007
From the documentation:

IOException is the base class for exceptions thrown while accessing
information using streams, files and directories.

The Base Class Library includes the following types, each of which is a
derived class of IOException :

a.. DirectoryNotFoundException

b.. EndOfStreamException

c.. FileNotFoundException

d.. FileLoadException

e.. PathTooLongException

Where appropriate, use these types instead of IOException.

So in your case, reading from a network stream could definitely do it.
Like Jon said, what's the message that is in the IOException instance?


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)



"Zytan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I got a System.IO.IOException in my app on another computer, so I
> couldn't debug it. I don't think it was a HD error. What else could
> throw this? Could it be from reading a webpage from the internet
> through a stream?
>
> Zytan
>



 
Reply With Quote
 
per9000
Guest
Posts: n/a
 
      9th May 2007
On 8 Maj, 22:50, Zytan <zytanlith...@gmail.com> wrote:
> [...] What else could
> throw this? [...]


I hate to be a wise guy here but if any .NET-app could throw a
System.IO.IOException. It would be meaningless in most cases and
probably not the answer you are looking for, but still...

Example:

using System;
class Program
{
static void Main(string[] args)
{
throw new System.IO.IOException("foo");
}
}

/Per

--

Per Erik Strandberg
Tomlab Optimization Inc.
http://tomopt.com/tomnet/



 
Reply With Quote
 
Zytan
Guest
Posts: n/a
 
      9th May 2007
> Well, what was the message from the IO exception?

Wouldn't I love to know! The windows error report window doesn't show
it.

Zytan

 
Reply With Quote
 
Zytan
Guest
Posts: n/a
 
      9th May 2007
> IOException is the base class for exceptions thrown while accessing
> information using streams, files and directories.


> So in your case, reading from a network stream could definitely do it.
> Like Jon said, what's the message that is in the IOException instance?


Yes, that's exactly what I was thinking. I don't know the message, I
wish I knew it! The Windows error report doesn't show it.

I put in an exception handler for my http accessing via stream, since
I believe that's where it came from, so I'll know next time.

Thanks,
Zytan

 
Reply With Quote
 
Zytan
Guest
Posts: n/a
 
      9th May 2007
> > [...] What else could
> > throw this? [...]

>
> I hate to be a wise guy here but if any .NET-app could throw a
> System.IO.IOException.


Yes, that's true. But, I don't so this myself, and I don't use 3rd
party code, so some .NET library function threw this. I was just
wondering what type of functions that may be. I've got my answer,
now.

Most of my HD accessing is handled, and I just added exception
handling to the rest. So, that may have been my problem, maybe it was
a file being written. I assumed it wasn't since the HD has tons of
free space.

Zytan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.IOException using GPS COM port Mrc Microsoft Dot NET Compact Framework 0 21st Aug 2007 04:18 PM
Diagnosing System.IO.IOException =?Utf-8?B?UmljY2k=?= Microsoft Dot NET Framework 5 24th Aug 2006 12:47 PM
System.IO.IOException: because it is being used by another proces =?Utf-8?B?VGFv?= Microsoft Dot NET Framework 2 17th Jul 2005 09:38 PM
System.IO.IOException' occurred in mscorlib.dll Paul Ilacqua Microsoft Dot NET Compact Framework 4 2nd Feb 2005 11:58 PM
System.IO.IOException Krissy Microsoft ASP .NET 2 31st Jul 2003 03:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:27 PM.