[Mono-list] Server Error: Cannot find type XXXX._Default

Ravi Thapliyal thapliyal.ravi at gmail.com
Mon Mar 19 08:09:06 EDT 2007


Here is the complete steps what am I following.

 

     On Windows XP (VS2005), I am creating a new Project(C# -> ASP.NET Web
Application) name "Try" at "C:\"

     Under this are the following files when Build are:-

                   Try.sln

Try ( bin - Try.dll & Try.pdb)

 
Default.aspx,Default.aspx.cs,Default.aspx.designer.cs,Obj,Properties,Try.csp
roj,Try.csproj.user,Web.config

 

  1)   "Default.aspx"

 

 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="Try._Default" %>

 

2) "Default.aspx.cs"

.

namespace Try

{

    public partial class _Default : System.Web.UI.Page

    {

       protected void Button1_Click(object sender, EventArgs e)

        {

            TextBox1.Text = "Ravi";

        }

    }

}


After this I am publishing this in Web(SuseLinux 10 with SP1) which is
configure with mod_mono2(apache) with the following options:- 


1.       Delete all existing files prior to publish.


2.       Only Files needed to run this application.


3.       Include files from the App_Data folder.


Now the files at Suse Linux are like this shown Below:-


bin
       -  Try.dll
       -  Try.pdb
Default.aspx
Web.config


 "httpd.conf"  .  added this line    Include /etc/apache2/mod_mono.conf


 "mod_mon.conf"


DocumentRoot "/srv/www/htdocs"

LoadModule mono_module /usr/lib/apache2/mod_mono.so

Alias /WebApplication1 "/srv/www/htdocs"

 

MonoServerPath default /usr/bin/mod-mono-server2

AddMonoApplications default "/WebApplication1:/srv/www/htdocs"

<Directory "/srv/www/htdocs">

       Options None

       AllowOverride None

       Order allow,deny

       Allow from all

       SetHandler mono

       <IfModule mod_dir.c>

              Directoryindex index.aspx

       </IfModule>

</Directory>


After Giving the permission to read to all the files, I am accessing this
default.aspx on SuseLinux server and it displays the following error.


Server Error in '/WebApplication1' 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 Try._Default 

File name: /srv/www/htdocs/Default.aspx    Line: 1 

Source Error: 


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="Try._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Please, can somebody help me on this, I am stuck here.


Thanks
Ravi


 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070319/4bf35a36/attachment-0001.html 


More information about the Mono-list mailing list