List Info

Thread: Web Projects




Web Projects
user name
2007-04-18 22:35:43
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
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st

Re: Web Projects
user name
2007-04-19 15:01:57
On 4/19/07, Paul <paultsaigmail.com> wrote:
> 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

The ASP.NET support in MD is split into two *separate*
AddIns, ASP.NET
Project Support and the AspNetEdit Visual Designer, which
can be
enabled/disabled when MD is built. The project support is
quite stable
and has been released in several packaged versions of MD
0.13.1. It
provides compile-and-run support for ASP.NET via XSP.

As for the error you have, it looks like you haven't
compiled the .cs
file into a dll and put it in the bin folder, as ASP.NET 1.1
requires.
You can use a normal library project to build the dll,
though the
ASP.NET Project Support would take care of this for you...

-- 
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )