[MonoDevelop] Web Projects

Paul paultsai at gmail.com
Wed Apr 18 23:35:43 EDT 2007


I have been trying to compile a basic web app with mono develop (using
a code behind page) and have not been having much luck.

I installed mono develop from the ubuntu packages.  I know there is an
add on (ASPEdit) for MD but have my reservations about installing it
from SVN.  Is there another way of compiling Web Apps with MD without
ASPEdit?  What kind of solution do I set up?  Are there any special
settings to use?

Thanks in advance.

Note I want to use .NET 1.1.  I've tried to include the relevant files below.

Excerpt from mono-server-hosts.conf
 Alias /test1 "/home/user/WebSite"
     AddMonoApplications default "/test1:/home/user/WebSite"
       <Directory /home/user/WebSite>
         SetHandler mono
           <IfModule mod_dir.c>
              DirectoryIndex Default.aspx
           </IfModule>
       </Directory>

Default.aspx
<%@ Page language="c#" Codebehind="Default.cs" Inherits="Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Hello World</title>
</head>
<body>
     <form action="Default.aspx" method=post runat="server" id="form1">
    <div>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>


Default.cs
using System;
using System.Web;
using System.Web.UI;

public class Default :System.Web.UI.Page
{
    protected System.Web.UI.WebControls.Label Label1;

    protected void Page_Load(Object sender, EventArgs e)
    {
        Label1.Text = "Hello World!";
    }
}

Error Message
Server Error in '/test1' Application________________________________

Parser Error Description: Error parsing a resource required to service
this request. Review your source file and modify it to fix this error.

 Error message:
Cannot find type Default

 File name:  /home/altacus/WebSite/Default.aspx    Line: 1  Source
Error:   <%@ Page language="c#" Codebehind="Default.cs"
Inherits="Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Hello World</title>


-- 
Paul


More information about the Monodevelop-list mailing list