Home All Groups Group Topic Archive Search About

system.io.filenotfound - Runtime

Author
6 Jun 2006 3:45 PM
Lee
I get the error system.io.filenotfound logged in the application event log
when my .NET 2.0 application runs. I compiled the application using NGEN
which compiled successfully without any errors. How can I determine the
path/name of the missing file?

Author
7 Jun 2006 8:52 AM
Vadym Stetsyak
Hello, Lee!

L> I get the error system.io.filenotfound logged in the application event
L> log when my .NET 2.0 application runs. I compiled the application using
L> NGEN which compiled successfully without any errors. How can I determine
L> the path/name of the missing file?

If that exception is thrown in the app init time, then this may indicate that
referenced assembly was not found. To see what wasn't found use
fuslogvw.exe.

If custom file was not found then, either application logic must handle these
situations and properly log them, if application logic cannot be modified,
then advanced debugging can help.

Look at ( http://blogs.msdn.com/tess/archive/2006/04/27/584927.aspx ),
the same can be applied when searhing reason of FileNotFound exception...
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
7 Jun 2006 1:04 PM
Lee
debuggers are fine for the development world, but don't see how that's going
to help me in a production environment. I guess the real answer to the
question is "No" you cannot find out which file is missing, only that a
missing file caused the error. That should be a nice feature that MS could
add to then exception processing. After all knowing that a file is missing is
just as important as knowinf which one. Really this is no different that the
old VB6 file not found error number, a rose by other name....
Author
7 Jun 2006 1:46 PM
Jim Wooley
> debuggers are fine for the development world, but don't see how that's
> going to help me in a production environment. I guess the real answer
> to the question is "No" you cannot find out which file is missing,
> only that a missing file caused the error. That should be a nice
> feature that MS could add to then exception processing. After all
> knowing that a file is missing is just as important as knowinf which
> one. Really this is no different that the old VB6 file not found error
> number, a rose by other name....

You may try out the FileMon at SysInternals. It should show you what files
are being requested and indicate if they are not found. It won't necessarily
tell you where in your code you are trying to access that file, but it is
a start. see http://www.sysinternals.com/Utilities/Filemon.html.

I also saw a slick solution from AppSight which could help isolate the issue.
Their solution is NOT cheap. You can find them at http://www.identify.com/.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx

AddThis Social Bookmark Button