[Mono-devel-list] mod_mono error: The path is not of a legal form
Mike McKay
mike at vdomck.org
Fri Oct 15 07:28:07 EDT 2004
I am trying to use mod-mono to run aspx pages that refer to code that
needs to be compiled on the fly.
This is the aspx page:
<%@ Page language="c#" src="Wiki.aspx.cs" AutoEventWireup="false"
Inherits="MonoWiki.Wiki" validateRequest="false" %>
When I try and run it though, I get this:
(hacked down for your reading pleasure)
System.ArgumentException: The path is not of a legal form
Parameter name: path
inSystem.IO/Path.cs:202) System.IO.Path:GetFullPath (string)
CacheDependency.cs:174) System.Web.Caching.CacheDependency:CreateWatcher
CacheDependency.cs:164) System.Web.Caching.CacheDependency:.ctor
CacheDependency.cs:81) System.Web.Caching.CacheDependency:.ctor
CachingCompiler.cs:144) System.Web.Compilation.CachingCompiler:Compile
TemplateParser.cs:437)
System.Web.UI.TemplateParser:GetAssemblyFromSource ....... (snipped, it
goes on)
Following the trail through the source it looks like some sort of path
variable is empty. From TemplateParser.cs I found this:
Assembly GetAssemblyFromSource (string vpath)
{
vpath = UrlUtils.Combine (BaseVirtualDir, vpath);
string realPath = MapPath (vpath, false);
if (!File.Exists (realPath))
ThrowParseException ("File " + vpath + " not found");
AddDependency (realPath);
CompilerResults result = CachingCompiler.Compile (language,
realPath, realPath, assemblies);
Which wasn't terribly helpful, but perhaps to one of you it is.
I suspect my mod_mono configuration might be wrong. This is what it my
httpd.conf looks like:
LoadModule mono_module /usr/lib/apache/1.3/libmod_mono.so
AddModule mod_mono.c
Alias /mono "/var/www/mono"
MonoApplications "/mono:/var/www/mono/"
MonoPath "/var/www/mono/bin/"
MonoDocumentRootDir "/var/www/mono/bin/"
<Directory /var/www/mono/ >
SetHandler mono
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.aspx index.html
</IfModule>
</Directory>
Others seem to have the same problem:
1)
http://www.gotmono.com/cgi-bin/yabb/YaBB.pl?board=news;action=display;num=1088019181
2) http://bugzilla.ximian.com/show_bug.cgi?id=66094
The recommendation from 1, of running xsp with a root option didn't make
a difference:
mono /usr/bin/xsp.exe --root FOLDERNAME
And from 2), my path to mcs if pretty normal: /usr/local/bin/mcs
Does anybody have any ideas?
Mike
More information about the Mono-devel-list
mailing list