[Mono-bugs] [Bug 532679] Precompiled website with themes causes 'virtualPath' NullException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 27 07:09:05 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=532679

User mhabersack at novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=532679#c18





--- Comment #18 from Marek Habersack <mhabersack at novell.com>  2009-08-27 05:09:04 MDT ---
(In reply to comment #16)
[snip]
> xsp are: index.aspx, Default.aspx, default.aspx, index.html and index.htm (N.B
> case sensitivity). My test application was originally using ‘Default.aspx’
> however when I remove this and add ‘Index.aspx’ the error appears.
To work around the case-sensitivity issues, Mono has
http://www.mono-project.com/IOMap

> 
> This seems to be related to System.Web.Compilation.BuildManager.FixVirtualPaths
> calling GetAbsoluteVirtualPath (line: 639) which calls
> VirtualPathUtility.Combine using VirtualPathUtility.GetDirectory(req.FilePath).
> With no Default Index file specified ultimately (in
> System.WebVirtualPathUtility.IsAbsolute) a null  exception is thrown (I think
> at some point a blank is passed rather than ‘/’). Having Global.asax included
> is sufficient to replicate this problem however I don’t believe the problem is
> necessarily related to this file in particular.
Indeed, that was the case - fixed in r140786 (trunk), r140789 (2.4 branch) and
r140790 (2.4.2 branch)

> So to test ensure that you do not have ‘Index.aspx’ (N.B Case Sensitive)
> specified anywhere as a Default Index file in relation to XSP. The good news,
> as on my system, is that if you add the following to the <appSettings> section
> of your web.config file (as stated in the Mono documentation) the problem is
> resolved (try it with the attached test case):
> <add key="MonoServerDefaultIndexFiles" value="Index.aspx" />
That's one way of doing it, in this case sufficient. To keep your app portable
you should always match the filecase on disk with the case of references to the
file in your code or markup. It's usually a good idea to just make all your
files lowercase or camelcase, whichever suits you best.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list