[Pkg-mono-devel] Errors in ASP.NET
Tomasz Rybak
bogomips@post.pl
Wed, 22 Sep 2004 18:49:31 +0200
W li¶cie z wto, 21-09-2004, godz. 23:43, Tomasz Rybak pisze:
> > web_xml.aspx:
> > Server error in '/samples' application
> >
> > ________________________________________________________________________
> > Description: Error processing request.
> >
> > Error Message: HTTP 500.
> >
> > Stack Trace:
> > System.IO.FileNotFoundException: File '/people.xml' not found.
> > in [0x00158] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/corlib/System.IO/FileStream.cs:160) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
> > in [0x0000c] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/corlib/System.IO/FileStream.cs:109) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
> > in <0x00081> (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
> > in [0x00076] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.XML/System.Xml/XmlUrlResolver.cs:76) System.Xml.XmlUrlResolver:GetEntity (System.Uri,string,System.Type)
> > in [0x00077] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.XML/System.Xml/XmlTextReader.cs:102) System.Xml.XmlTextReader:.ctor (string,System.Xml.XmlNameTable)
> > in [0x00007] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.XML/System.Xml/XmlTextReader.cs:68) System.Xml.XmlTextReader:.ctor (string)
> > in [0x00009] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.XML/System.Xml.XPath/XPathDocument.cs:78) System.Xml.XPath.XPathDocument:.ctor (string,System.Xml.XmlSpace)
> > in [0x00003] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.XML/System.Xml.XPath/XPathDocument.cs:59) System.Xml.XPath.XPathDocument:.ctor (string)
> > in [0x00055] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI.WebControls/Xml.cs:202) System.Web.UI.WebControls.Xml:LoadXpathDoc ()
> > in [0x0000c] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI.WebControls/Xml.cs:224) System.Web.UI.WebControls.Xml:Render (System.Web.UI.HtmlTextWriter)
> > in [0x0000d] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Control.cs:776) System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter)
> > in [0x00053] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Control.cs:614) System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter)
> > in [0x00014] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs:82) System.Web.UI.HtmlControls.HtmlForm:RenderChildren (System.Web.UI.HtmlTextWriter)
> > in [0x00009] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI.HtmlControls/HtmlContainerControl.cs:95) System.Web.UI.HtmlControls.HtmlContainerControl:Render (System.Web.UI.HtmlTextWriter)
> > in [0x00002] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs:76) System.Web.UI.HtmlControls.HtmlForm:Render (System.Web.UI.HtmlTextWriter)
> > in [0x0000d] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Control.cs:776) System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter)
> > in [0x00053] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Control.cs:614) System.Web.UI.Control:RenderChildren (System.Web.UI.HtmlTextWriter)
> > in [0x00002] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Control.cs:605) System.Web.UI.Control:Render (System.Web.UI.HtmlTextWriter)
> > in [0x0000d] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Control.cs:776) System.Web.UI.Control:RenderControl (System.Web.UI.HtmlTextWriter)
> > in [0x001eb] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Page.cs:770) System.Web.UI.Page:InternalProcessRequest ()
> > in [0x00052] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web.UI/Page.cs:720) System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
> > in [0x00091] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web/HttpApplication.cs:444) ExecuteHandlerState:Execute ()
> > in [0x0001e] (at /home/inet/debian/dev/build-area/mcs-1.0.1/class/System.Web/System.Web/HttpApplication.cs:708) StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool&)
> >
> > It looks like it tries to search file people.xml in root directory.
> > But in source, there is
> > <asp:Xml id="xml1" DocumentSource="people.xml"
> > TransformSource="peopletable.xsl" runat="server" />
> > without "/".
> >
> It works correctly under XSP. This error occurs when using Apache2.
> I haven't tested with Apache1.3/
This error is caused by MonoIO.GetCurrentDirectory.
I don't know. how to find implementation of this method.
In mcs/class/corlib./System.IO/MonoIO.cs is:
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static string GetCurrentDirectory (out MonoIOError error);
This example shows error:
<%@ language="C#" %>
<%@ import namespace="System.IO" %>
<html>
<script runat=server>
void Page_Load (object o, EventArgs e)
{
a.Text = Directory.GetCurrentDirectory();
}
</script>
<body>
<form runat="server">
<asp:label id="a" Text="Text as property" runat="server"/>
</form>
</body>
</html>
Under xsp it shows /usr/share/asp.net-demos/asp.
Under mod-mono it shows /.
It seems it's fixed in CVS (first is the most similar
to my problem):
http://bugzilla.ximian.com/show_bug.cgi?id=62726
http://bugzilla.ximian.com/show_bug.cgi?id=52872
http://bugzilla.ximian.com/show_bug.cgi?id=63828
--
Tomasz Rybak <bogomips@post.pl>