views:

459

answers:

2

I'm using a pre-compiled ASP.NET 2.0 site (i.e., copied to the server using the "Build->Publish Web Site" feature in Visual Studio 2005). I catch and log all errors which are usually quite detailed, but lately I've been getting the following error with no other information:

Could not load the assembly 'App-Web-rp2eml-j'. Make sure that it is compiled before accessing the page.

Now, that 'App-Web-rp2eml-j' file should be a dll in my bin folder which was created for the pre-compiled site. My main question is, how do I tell what aspx page is looking for that dll? I've tried re-publishing the site, and even completely wiping out the site and re-publishing, but the problem does not go away.

When Googling the problem, most answers about this error message center around making sure IIS is set up to use ASP.NET 2.0 instead of 1.1. This is not my problem.

NOTE 1: The site all seems to work, but obviously there is (at least) one page that is broken which I cannot find.

NOTE 2: The file name above should have underscores instead of dashes, but SO's markup is changing the text between the underscores to italics.

A: 

Maybe you can catch more detailed information on the error with the Global.asax event Application_OnError, so you can watch the stack Trace.

Jhonny D. Cano -Leftware-
+2  A: 

Does the mentioned dll exist in your bin directory? You italicized that portion so I suspect that it doesn't. That could mean that the error is referring to a dll in the Temporary files folder.

This problem can occur if one or more of the dlls in the ASP.NET Temporary files folder are corrupted. Sometimes ASP.NET does not refresh files here if there are no changes in the dll residing in the virtual directory. It happens every once in a while on my server.

My solution is as follows:

  1. Stop IIS services on the server for a minute or so.

  2. Navigate to the ASP.NET Temporary files folder (usually located at "%windir%\Microsoft.NET\Framework\\Temporary ASP.NET Files\MyApplicationName") and clear all files within the folder.

  3. Publish and upload my site to the configured virtual directory.

  4. Restart IIS and other services.

This simple 4-step process has worked very well for me in the past and may be worth a try for you.

To answer your basic question, however, there are two ways to "reverse engineer" a dll:

  1. Load it up in ILDASM and check the contained classes.
  2. Use Reflector to save all the class files contained within the dll to a folder.

However, I doubt if this will solve your problem because each dll could contain many class files and you would not have a clue as to "which ASPX page is looking for that dll".

Cerebrus
Thanks for accepting the answer! I hope these pointers helped you to resolve the problem.
Cerebrus