BUG: ASP.NET 2.0 FileNotFoundException

A

Alan Samet

I've just started getting random exceptions of type
FileNotFoundException on a framework I've ported to ASP.NET 2.0. The
exact message of the Exception is as follows:

Could not load file or assembly 'App_Web_tim3bwzz, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.

The highlighted line of source on the standard ASP.NET error page is
this:

Line 1: <%@ Control ClassName="UserBrowser" %>

I have a feeling that this exception is related to some sort of
internal assembly caching and purging being out of sync. When I save
the offending file, the exception is resolved.

This concerns me in that I would not want to run into this issue when
my present application goes live. Is there any documentation that can
build my confidence that this won't happen once out of development?

-Alan
 
L

Laurent Bugnion

Hi,

Alan said:
I've just started getting random exceptions of type
FileNotFoundException on a framework I've ported to ASP.NET 2.0. The
exact message of the Exception is as follows:

Could not load file or assembly 'App_Web_tim3bwzz, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.

The highlighted line of source on the standard ASP.NET error page is
this:

Line 1: <%@ Control ClassName="UserBrowser" %>

I have a feeling that this exception is related to some sort of
internal assembly caching and purging being out of sync. When I save
the offending file, the exception is resolved.

This concerns me in that I would not want to run into this issue when
my present application goes live. Is there any documentation that can
build my confidence that this won't happen once out of development?

-Alan

I think that it could *also* be a version conflict. IIRC, when the
assembly with the correct version number is not found at runtime, this
exception is thrown. Such case often happens when other libraries are
referenced in a project as a DLL (as opposed to referenced as a project).

Make sure that all your versions are consistent, and if they are not,
recompile the top application (in this case the web project) using the
correct versions.

HTH,
Laurent
 
A

Alan Samet

I'm not building this application as a set of dlls. This is the reason
I'm so concerned. It seems like it could potentially be a bug in
ASP.NET of the worst kind -- the Gremlin.

I have a feeling that what's happening is as follows:

An aspx/ascx file changes that contains a reference to this file.
The compiled/cached dll that's generated by ASP.NET gets purged
When ASP.NET attempts to load the assembly, it doesn't catch that it
doesn't exist and then attempt a recompile, it just fails.

-Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top