[Mono-aspnet-list] ASP.NET / Mono question

Wardell Castles wardellcastles at yahoo.com
Sat Jul 6 20:26:13 UTC 2013


William,

Thanks for one of the clearest explanations I've found on the internet.    I think I have followed your instructions.  However I am still getting the same error, "Cannot find type HelloWorld.WebForm1"

Let me explain my setup.

These files are located at /var/www/HelloWorld  (/var/www is the root of my Apache server)
	1. index.aspx

	2. WebForm1.aspx

	3. WebForm1.aspx.cs

	4. WebForm1.aspx.designer.cs

Notes:
	1. index.aspx is just a simple aspx file that display the current date.  It's used to test to make sure Apache and mod-mono are working.  The other three files (2-4) were generated from VS Express for Web.

	2. WebForm1.aspx.cs contains the partial class HelloWorld.WebForm1 (which is what the error is saying it can't find).

In /etc/apache2 is where my httpd.conf file resides.   

This is what it contains:

LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so
Alias /HelloWorld "/var/www/HelloWorld"
AddMonoApplications default "/HelloWorld: /var/www/HelloWorld"
<location /HelloWorld>
 SetHandler mono
</location>

Other notes:
I've set the Apache2 error log level to "debug".  Nonetheless, there is nothing in the Apache2 error log to indicate there's a problem other than some weird message "File does not exist: /var/www/favicon.ico

Any clues or suggestions will be welcome.



________________________________
 From: William Ivanski <william.ivanski at gmail.com>
To: mono-aspnet-list at lists.ximian.com 
Sent: Friday, July 5, 2013 10:26 PM
Subject: Re: [Mono-aspnet-list] ASP.NET / Mono question
 


Good time of the day, Wardell,

Yes, it is possible.

If you were using XSP, all you need is run XSP with the "--root"
    option set to "/var/www/HelloWorld".
Thus, it is expected that all .aspx and .aspx.cs files are in this folder.

But, with Apache mod_mono, you will need to configure HelloWorld to
    be an application. More info on [1].

[1]
    
    http://gonzalo.name/blog/files/mod_mono.html

--
William Ivanski

On 05-07-2013 15:40, Wardell Castles wrote: 
Is it possible to take a project with "code behind" built from VS Express for Web on Windows and run it on Debian Linux with Apache and Mono?
> 
>I can get a basic hand coded .aspx page with no "code behind" to work fine.  So I know that my Debian OS, Apache, and Mono are wired up.
> 
>However when I take a simple page with code behind that was built from VS Express for Web and try to run it, I receive the message:.
> 
>Parser Error Message: Cannot find type HelloWorld.WebForm1
>Source Error:
>Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="/var/www/HelloWorld/WebForm1.aspx.cs" Inherits="HelloWorld.WebForm1" %> Line 2: 
Line 3: <!DOCTYPE html>
> 
>(Note: HelloWorld.WebForm1 is a partial class that inherits from System.Web.UI.Page.
>I "assume" it is contained in the HelloWorld.dll.   All of these files are in the same directory as the aspx file ) 
>
>
>_______________________________________________
Mono-aspnet-list mailing list Mono-aspnet-list at lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-aspnet-list 

_______________________________________________
Mono-aspnet-list mailing list
Mono-aspnet-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20130706/0d564b79/attachment.html>


More information about the Mono-aspnet-list mailing list