[Mono-aspnet-list] Create Web Site versus Web Application

jmalcolm malcolm.justin at gmail.com
Tue Jan 26 03:08:07 EST 2010

I do not believe that MonoDevelop supports the Web Site metaphor for ASP.NET.

I also recommend just using Web Application to build a website.  That is
what I do and my projects run great.

When you say the DLL "won't run" I am not sure what you mean though.  The
DLL is the compiled code that will be called by your pages but you do not
execute the DLL directly.  You should be trying to view your pages (for
example you may have a files with names like index.aspx or Default.aspx) in
a web browser.  These .aspx files will have @Page directive at the top that
include a statement like Inherits that specifies what classes and methods
from the DLL are available to that page.

You interact with the pages, and the pages call upon the DLL.  You need a
web server to serve the pages to your web browser.  On Linux, the Mono test
web server is called XSP (or XSP2).  There is also a module (mod_mono) that
allows the Apache web server to serve ASP.NET pages that will use Mono on
the server.

My apologies if I completely misunderstood your comment that the DLL "won't

If you really, really want a Web Site structure there are some

If you already have a Web Site structure, Mono should run it just fine using
either XSP or mod_mono on Apache as the web server.  The question is just
how to author one and I am assuming that you do not want to create it all in
gedit, vi, or emacs (although you could).

At one point, in what seems like the distant past, I used Visual Web
Developer, the free ASP.NET IDE from Microsoft, to connect remotely to files
on a Linux box that was running Mono and Apache/mod_mono.

I told Visual Web Developer (on Windows) to connect to the web site files
via FTP and just used an open web browser to connect to the linux web server
and test the files.  I did not use the built-in test web server provided by
Visual Web Developer.  This solution requires two boxes of course: one
Windows and one Linux but I remember thinking it was great at the time.  Any
of the changes I made in Visual Web Developer would be immediately reflected
on the Linux server each time I saved the files and I could see the results
right away in my browser.  The Web Site itself was running on Mono.

These days, you could use something like VirtualBox to run a copy of Windows
in a virtual machine to run Visual Web Developer and connect back to the
host Linux machine running Mono and the web server.  You would still need a
Windows license but at least you would only need one box and Linux could be
the OS running native on your hardware.

Instead of a remote project, you could also just run Mono/XSP on Windows by
running XSP on top of the local web site directory.  Just use a browser to
connect to XSP instead of the web server Microsoft builds into Visual Web
Develop and your app will be running on Mono.  This means using Windows
exclusively though and you said you are running Ubuntu.

One thing that some people confuse is the difference between using
MonoDevelop and running "on Mono".

If you are using XSP or Apache/mod_mono as your web server for development
then your application is running on Mono regardless of what you use to
author the web site.  You do not need to run MonoDevelop to create a Mono

On Windows, you actually do not even have to have Mono installed to run
MonoDevelop.  The stock Windows binaries available at monodevelop.com are
built to run on MS.NET and not on Mono at all.  By default, the apps you
build will also run on .NET although you can install Mono and tell
MonoDevelop to use Mono instead of MS.NET for apps you write.

One last thing, I do not believe that the VB compiler for Mono is of the
same quality as the one for C#.  If you are not set on the language, you
might consider using C# under Mono or compiling your code on .NET and just
bringing the assemblies over to Mono.  I am sure the VB support is getting
better and better though.

Alexander M. Batishchev-2 wrote:
> Hi.
> As far as I know, MD doesn't supports Web Sites but fully supports Web
> Apps.
> I converted my own Site to App and XSP runs it without any problems!
> Alex
> -----Original Message-----
> From: mono-aspnet-list-bounces at lists.ximian.com
> [mailto:mono-aspnet-list-bounces at lists.ximian.com] On Behalf Of Jeffrey
> Walton
> Sent: Friday, January 22, 2010 4:51 PM
> To: Mono - Asp.Net
> Subject: [Mono-aspnet-list] Create Web Site versus Web Application
> Hi All,
> I'm working with Mono 2.0 on Ubuntu 9.10.
> How would I go about creating a Web Site with CodeBehind (ASPX and VB
> files) rather than a Web Application? At this point, File -> New ->
> ... only offers a Web Application. The output is a DLL that won't run.
> I attempted to change to an Executable, but the IDE throws an
> InvalidOperation exception (IIRC).
> Thanks
> Jeff
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list

View this message in context: http://old.nabble.com/Create-Web-Site-versus-Web-Application-tp27273430p27319125.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

More information about the Mono-aspnet-list mailing list