473,387 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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

May 8 '07 #1
6 4736
Zytan <zy**********@gmail.comwrote:
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 - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
May 8 '07 #2
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]
- mv*@spam.guard.caspershouse.com

"Zytan" <zy**********@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
>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

May 9 '07 #3
On 8 Maj, 22:50, Zytan <zytanlith...@gmail.comwrote:
[...] 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/

May 9 '07 #4
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

May 9 '07 #5
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

May 9 '07 #6
[...] 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

May 9 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Darrell Wesley | last post by:
I'm looking at diving into .net and have several questions. At this plant site we have a diversity of PC's with different operating systems from WIN98, Win2000 to XP-Home and XP-PRO and NT 4.0....
3
by: James | last post by:
How can i programicly find out what operating system i am using? i have tried using: getenv("OS"); it works works on xp/2000 but it doesn't seem to work on windows95/98/ME. im using ms visual...
2
by: kids | last post by:
Does anybody know any reason which could cause Ms. word automation to crash? I try to call word automation to open a document and use find and replace function. For some reason it works but I...
1
by: Tim Mulholland | last post by:
I have an application that uses an external C(?) Dll and it seems like after I make a specific call to that dll the application will crash at a random call to the dll in the future. It sometimes...
1
by: darrel | last post by:
We've purchased a component that requires us to install two DLLs. One we add as a reference to our project, but the otherone we have to add to the 'environment setup' as a system path reference....
1
by: Rymfax | last post by:
I've created a Download Manager application and I'm having a problem with some clients where for whatever reason, the remote connection is forceably closed (whether on the client side or server...
1
by: ramyamuthusamy | last post by:
hi, What is System Idle Process? how the screen saver execution starts...
11
by: ulai | last post by:
Hello everyone, I want to export GridView (25000 records) to Excel. But i got an error message like : System.OutOfMemoryException was Thrown. But i need to export the records (even more than...
5
by: khagesh gupta | last post by:
i want to know that beacause in union a bigger variable is stored in little endian system. while reading a book "test your c skills",i found a question in which author gave hexadecimal...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.