[Mono-aspnet-list] Bug With Default Index Files (MonoServerDefaultIndexFiles) and Pre-compiled Sites with Xsp2

Gonzalo Paniagua Javier gonzalo.mono at gmail.com
Sat Feb 5 01:15:45 EST 2011

On Fri, 2011-02-04 at 18:22 -0800, Dave Glick wrote:
> For future reference, I tracked the problem down and opened a bug here:
> https://bugzilla.novell.com/show_bug.cgi?id=669757
> After examining the code, I think the problem is in
> XSPWorkerRequest.TryDirectory(). If I understand what's going on correctly,
> this method checks if the path that the SimpleWorkerRequest base reports from
> GetFilePathTranslated() is actually a directory. If so, it checks the
> configured list of default index files to see if one actually exists. The
> problem is that it does this check using File.Exists which only checks the
> physical file system. In a pre-compiled site, none of the actual pages exist in
> the physical file system - they're stored in a compiled form in the /bin folder
> along with the pre-compile definition.
> To fix the problem, the XSPWorkerRequest.TryDirectory() method needs to not
> only check the physical file system, but the pages that have been pre-compiled
> as well. Unfortunately, I don't know enough about the web routing system to
> suggest how to do this. Is there a method you can call to ask "does this page
> exist in a pre-compiled form"?

AFAIR, precompiling does not remove the .aspx et al. It just strips them
out of content and leaves one line saying that the file is a place
holder... So 'Default.aspx' should be there with that line but the
actual class is loaded from the 'bin' directory.


More information about the Mono-aspnet-list mailing list