[Mono-list] Re: CodeBehind tag from VS.NET

Adrian Dinu adrian.dinu at dreamsoftware.ro
Wed Jul 6 04:37:51 EDT 2005


Did you declare your app as being a mono application?

you need to do that in mod_mono.conf

Sample configuration:

MonoApplications
"/WebApplication1:/usr/share/asp.net-demos/asp/WebApplication1"
        <Directory /usr/share/asp.net-demos/asp/WebApplication1>
                Options -Indexes
                <IfModule mod_access.c>
                        Order allow,deny
                        Allow from all
                </IfModule>
                <IfModule mod_dir.c>
                        DirectoryIndex index.aspx
                </IfModule>
        </Directory>

otherwise, it will try to find the required dll in the bin directory of
the default mono application that was defined in the config file.


On Wed, 2005-07-06 at 09:26 +0100, Gavin Hamill wrote:

> On Wednesday 06 July 2005 07:52, Robert Jordan wrote:
> 
> Hi Robert,
> 
> > You don't need to change the file containing the codebehind attribute.
> > What you have to do is: compile the codebehind file and put the assembly
> > into the bin folder of the ASP app.
> 
> I thought I did.. e.g.
> 
> apachectl stop; killall mono; rm -r /tmp/.wapi; (wait for apache to really 
> stop); apachectl start
> 
> I then copied the whole contents from the Windows XP localhost IIS install to 
> qax, the Mono machine (all except for the _vti FrontPage dirs)
> 
> qax:/usr/share/asp.net-demos/asp/WebApplication1# find
> .
> ./bin
> ./bin/WebApplication1.dll
> ./bin/WebApplication1.pdb
> ./AssemblyInfo.cs
> ./Global.asax
> ./Global.asax.cs
> ./Global.asax.resx
> ./Web.config
> ./WebApplication1.csproj
> ./WebApplication1.csproj.webinfo
> ./WebForm1.aspx
> ./WebForm1.aspx.cs
> ./WebForm1.aspx.resx
> 
> So as you can see, the .dll is already there in the bin directory, yet running 
> the WebForm1.aspx from a browser just comes back with:
> 
> Server Error in '/samples' 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 WebApplication1.WebForm1 
> File name:  /usr/share/asp.net-demos/asp/WebApplication1/WebForm1.aspx    
> Line: 1 
> Source Error: 
> <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" 
> Inherits="WebApplication1.WebForm1" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> <HTML>
>         <HEAD>
> 
> Cheers,
> Gavin.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


________________________________________________________________________

Adrian Dinu
Technical Manager
Dream Team Software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://galactus.ximian.com/pipermail/mono-list/attachments/20050706/925f0adc/attachment.html


More information about the Mono-list mailing list