[Mono-devel-list] XSP not processing simple ASP.NET page

Chris List Recipient chris-list2 at surfcity.com
Tue Mar 16 18:04:50 EST 2004


I am brand spanking new to mono. I installed the latest mono and xsp on SuSE
9.x using the binary RPMs. I can compile and run the a "hello world" app
from the command line. I can run the XSP and serve up HTML pages. Now I am
trying to serve up an aspx page. I get an error viewing the simple ASP.NET
test example. It appears to be shoving my cs source code smack into the
middle of the mono-generated source code. There must be something
fundamentally wrong.

Here is the source to test2.aspx:

----------------
<%@ Page Language="C#" %><% // This is executed at page startup

public void Page_Load()
{
  label1.InnerHtml = now(); 
}

%>

<html>
<body>
<h2>Hello Mono!</h2>
<p><span id="label1" runat=server/></p>
</body>
</html>
----------------

Here is the output to the web browser:

----------------
Description: Error compiling a resource required to service this request.
Review your source file and modify it to fix this error. 
Error message: /tmp/tmp6594a60e.cs(64,0) : error CS1002: Expecting `;' (0,0)
: error .CSharp.yyParser.yyException: irrecoverable syntax error
/tmp/tmp6594a60e.cs(70,0) : error CS8025: Parsing error (0,0) : error
failed: 2 error(s), 0 warnings 

File name: /home/chris/webroot/test2.aspx

Source File: /tmp/tmp6594a60e.cs 

Line 1: //
----------------------------------------------------------------------------
--
Line 2: //  <autogenerated>
Line 3: //      This code was generated by a tool.
Line 4: //      Mono Runtime Version: 1.1.4322.573
Line 5: // 
Line 6: //      Changes to this file 
 
[snip]

Line 61:         private void __RenderTree(System.Web.UI.HtmlTextWriter
__output, System.Web.UI.Control parameterContainer) {
Line 62:             // This is executed at page startup
Line 63: 
Line 64: public void Page_Load()
Line 65: {
Line 66:   label1.InnerHtml = now(); 
Line 67: }
Line 68: 
Line 69: 
Line 70:             __output.Write("\n\n<html>\n<body>\n<h2>Hello
Mono!</h2>\n<p>");
Line 71:             parameterContainer.Controls[0].RenderControl(__output);
Line 72:             __output.Write("</p>\n</body>\n</html>\n");
Line 73:         }

[snip]






More information about the Mono-devel-list mailing list