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

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 27 05:01:45 EDT 2009


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

User chrisbrown76 at hotmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=532679#c16


Chris Brown <chrisbrown76 at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #314419|0                           |1
        is obsolete|                            |




--- Comment #16 from Chris Brown <chrisbrown76 at hotmail.com>  2009-08-27 03:01:43 MDT ---
Created an attachment (id=315470)
 --> (http://bugzilla.novell.com/attachment.cgi?id=315470)
Simple test case

I have been doing some further testing on this issue. I believe I have now
uploaded a test case which can replicate the problem (attached). 

I have been testing with sources downloaded from
http://mono.ximian.com/monobuild/snapshot/sources-trunk/ as suggested by Marek.
I was using mono-140267.

I have been compiling only the System.Web.dll by setting the terminal to the
location of my downloaded sources e.g
~/Desktop/mono-140267/mcs/class/System.Web . I then run the command ‘make
PROFILE=net_2_0 && make install PROFILE=net_2_0’ to compile this library to (in
my case)  /usr/local/lib/mono/gac/System.Web/2.0.0.0_b03f5f7f11d50a3a. I then
copy System.Web.dll and System.Web.dll.mdb from this location to
/usr/lib/mono/gac/System.Web/2.0.0.0_ b03f5f7f11d50a3a. I then restart xsp
obviously. (Su Neks maybe you can try this approach to upgrade the library on
your system).

I can confirm that the earlier test case I uploaded in relation to Themes
no-longer causes an issue with this newer version of the library. However,
there does still seem to be a problem. It seems to relate to Default Index
Files. According to the documentation the default files currently specified for
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.

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.

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" />

I am compiling the test case as follows:

aspnet_compiler  -f –p c:\inetpub\wwwroot\MonoTest  -v /
“c:\Development\MonoTest\Precompiled” –fixednames

(Su Nek maybe you can try this also. I think the ‘-v /’ option should resolve
your “This is a marker file....” problem which is an issue I had originally)
Sorry its such a long explanation but I hope its clear enough. I haven’t
changed the status of this bug at this stage.

-- 
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