[Mono-aspnet-list] Argument cannot be null. Parameter name: virtualPath

nzsaint chrisbrown76 at hotmail.com
Fri Aug 14 02:52:20 EDT 2009



nzsaint wrote:
> 
> Argument cannot be null. Parameter name: virtualPath
> Description: HTTP 500. Error processing request.
> Stack Trace:
> System.ArgumentNullException: Argument cannot be null.
> Parameter name: virtualPath
>   at System.Web.VirtualPathUtility.IsAbsolute (System.String virtualPath)
> [0x00000]
>   at System.Web.VirtualPathUtility.IsRooted (System.String virtualPath)
> [0x00000]
>   at System.Web.Compilation.BuildManager.GetAbsoluteVirtualPath
> (System.String virtualPath) [0x00000]
>   at System.Web.Compilation.BuildManager.FixVirtualPaths () [0x00000]
>   at System.Web.Compilation.BuildManager.LoadPrecompilationInfo ()
> [0x00000]
>   at System.Web.Compilation.BuildManager..cctor () [0x00000]
> Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
> 2.0.50727.1433
> 

I have been investigating this problem and I think that it may be a bug in
Mono in or around System.Web.Compilation.BuildManager.FixVirtualPaths. I can
recreate the problem with a very simple test application. To do this build a
new website 'MonoTest' in Visual Studio and add a themes folder 'Theme1'.
Precompile the website using aspnet_compiler e.g:
aspnet_compiler -f -p c:\inetpub\wwwroot\MonoTest -v / c:\Precompiled
Copy the files to your Mono environment, configure .conf and .webapp files
and run the site under Apache or XSP.

The problem seems to occur because in the case of the
Themes_Themes1.compiled file that is created for the Themes1 folder the
virtual path is '/App_Themes/Theme1/'. FixVirtualPaths splits by '/' into a
string array which ultimately results in an empty string being passed to
System.Web.VirtualPathUtility.IsAbsolute which raises the NullException.

I would appreciate any thoughts on this.
-- 
View this message in context: http://www.nabble.com/Argument-cannot-be-null.-Parameter-name%3A-virtualPath-tp24822157p24967090.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list