I have a basic ASP.NET MVC2 site which logs a single \"File does not exist\" error every time a view (not partial views) is loaded. I am pretty sure this is because I am ref
Check your CSS files for url( resource_path ) where "resource_path" doesn't exist.
I was getting the same exception. Found problem was in CSS file where an image file was missing from the project and not on the file system. For example a line like:
background-image: url( /images/foo.png );
Where "foo.png" file isn't in in the images folder.
You can cast the last exception as an HttpException to get the HTML status code:
HttpException httpEx = Server.GetLastError() as HttpException;
if( httpEx != null )
httpEx.GetHttpCode(); // Will be HTML status code, 404 in this case.
But it doesn't contain any information what file is missing. I found the missing file by checking every CSS class declaration on the page were this error was occurring.