[Mono-devel-list] ASP.NET: Cannot find type

Rafael Teixeira monoman at gmail.com
Tue Jul 5 11:57:55 EDT 2005


Please google for the @assembly directive and some discussion of the
<assembly> section in web.config. Mono may have a bug or isn't
configured exactly as MS.NET in that regard, as surely a library
deployed to the /bin directory should have been referenced
automatically. Note that AFAIK xsp/mod_mono have a restart problem so
that some changes, and yor case may fit the bill, demand you to
restart manually the server to really appear, we are still looking for
a solution...

Fun,

On 7/5/05, Slava Petrenko <slava at z.org.ua> wrote:
> Rafael Teixeira wrote:
> >You need to compile the C# file as VS.NET does for you when it handles
> >the 'codebehind' attribute in @page directive...
> >
> >:|
> >
> well, i did
> mcs Default.aspx.cs -r:System.Web -r:System.Data -r:System.Drawing
> -r:bin/CMSNET.dll -t:library
> 
> and got Default.aspx.dll, moved it to bin and the result is the same as
> it was :-(
> 
> some backgrounds: it's a sample asp.net site i'm trying to get working
> with mono. it was created with vs.net and has .csproj. pj2make created
> me a make file from .csproj. make created CMSNET.dll. so i compile all
> .cs files with that dll.
> >On 7/4/05, Slava Petrenko <slava at z.org.ua> wrote:
> >
> >>hi all,
> >>
> >>any ideas how to find out why defined type doesn't get found?
> >>
> >>i've got this:
> >>
> >>
> >>  Server Error in '/test' 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 CMSNET._Default
> >>
> >>*File name: * /home/slava/web/CMSNET/Default.aspx    *Line: *1 **
> >>
> >>***Source Error: * **
> >>||
> >>
> >><%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="CMSNET._Default" %>
> >><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> >><HTML>
> >>    <HEAD>
> >>
> >>
> >>
> >>
> >><Default.aspx.cs> - is at the same catalog as Default.aspx is
> >>
> >>*using* System;
> >>*using* System.Collections;
> >>*using* System.ComponentModel;
> >>*using* System.Data;
> >>*using* System.Drawing;
> >>*using* System.Web;
> >>*using* System.Web.SessionState;
> >>*using* System.Web.UI;
> >>*using* System.Web.UI.WebControls;
> >>*using* System.Web.UI.HtmlControls;
> >>
> >>*using* CMSNET.Common;
> >>
> >>*namespace* CMSNET
> >>{
> >>//    *public* *class* _Default : System.Web.UI.Page
> >>    {
> >>*       protected* System.Web.UI.WebControls.HyperLink HyperLink1;
> >>*
> >>       private* void Page_Load(object sender, System.EventArgs e)
> >>        {
> >>            string ready = *new* AppEnv(Context).GetAppSetting("ready");
> >>
> >>            *if*(ready.Equals("true"))
> >>            {
> >>                Response.Redirect("CDA/HomePg.aspx");
> >>            }
> >>        }
> >>
> >>        #region Web Form Designer generated code
> >>        *override* *protected* void OnInit(EventArgs e)
> >>        {
> >>                InitializeComponent();
> >>        *       base*.OnInit(e);
> >>        }
> >>
> >>        *private* void InitializeComponent()
> >>        {
> >>            *this*.Load += *new* System.EventHandler(*this*.Page_Load);
> >>
> >>        }
> >>        #endregion
> >>    }
> >>}
> >>
> >></Default.aspx.cs>
> >>
> >>
> >>_______________________________________________
> >>Mono-devel-list mailing list
> >>Mono-devel-list at lists.ximian.com
> >>http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >>
> >>
> >
> >
> >
> 
> 


-- 
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!



More information about the Mono-devel-list mailing list