Precompiling your Visual Web Developer Projects

For more information about LAMA servers, checkout:
LAMA – Best of ALL worlds tutorial


Precompiling Web Projects
Visual Web Developer – Microsoft’s free version of Visual Studio, is a great tool to create quality Sites.  VWD being free- does not include all the tools that Visual Studio does. In this case VWD does not include the option to precompile your web project.

Why Precompile?
Well – there are a couple reasons.  First, to remove all code in your project and place it in compiled DLL’s.

This may be a good option for those who host on a shared server.  That way your code is not placed in plain text on the server for others to see.

Next, to save server resources.  The first hit on the server is when the project is compiled.  If you precompile, then it saves those resources by not having to compile on the server.

Lastly, Mono’s vb compiler for Linux is a few steps behind the C# compiler.
If you have a LAMA server,  and like to use VB as your language.  You can precompile your site to ensure that it will work correctly.

Use The Precompiling tool!
You can use this handy GUI to precompile your websites. Precompiler

NOTE: This is a ClickOnce Program, you may have to use Internet Explorer or Firefox to open it from the website.

A MySql Test site to for your LAMA Server

This is part of the LAMA – Best of all worlds tutorial
LAMA Tutorial Home Page


MySql Test Site with Visual Web Developer 2005

1.) Lets open up VWD, and create a new website called mysql-test-site

2.) Add the Mysql Connector/Net to the references.
Right click on the website name in Solution explorer, and choose Add Reference.

Select the MySql.Data from the list, and choose OK.

3.) Add a Data Grid View to the page.
In the Toolbox under Data, Select Grid View and drag it out onto the blank page.

4.) Your Code behind file should have the following code in it:

Imports System.Data

Imports MySql.Data.MySqlClient

Partial Class _Default

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As ObjectByValAs System.EventArgs) HandlesMe.Load

‘The MySql Connection String:  replace IP address with the IP address of your LAMA server

Dim Conn As NewMySqlConnection(“server=,database=testsite,Uid=aspnet,Pwd=aspnetpassword”)

Dim sSql As String = _

“Select * from phonebook”

Dim DA As New MySqlDataAdapter(sSql, Conn)

Dim DT As New DataTable


Me.GridView1.DataSource = DT ‘set the datagrid to the datatable


End Sub

End Class


5.) Run the project in VWD to make sure it works.  You should see a datagrid with our test data in it.

If you see John Doe, then its time to copy your project into your asp_net share and setup a test site for it.

Follow the instructions in the tutorial for copying and setting up the site. users: Make sure to precompile your sites before copying them to the LAMA server.

Tutorial – Configure Apache for Site

Precompiling your Visual Web Developer Sites

Installing Mono on your Ubuntu 8.04 LAMA Server


This is part of the LAMA – Best of all worlds tutorial
LAMA Tutorial Home Page

The Script has put together a script for you to help with your Mono source install.  With help fromSean’s Mental Walkabout Mono Script and some changes to make it Ubuntu specific.  This script will download all necessary software required to compile and install mono.

It will also download and install the mod_mono apache module, and setup your apache to recognize websites.

This script is specific to Ubuntu 8.04LTS. It may work on other Ubuntu verisions but has not been tested.

To get started:
Use Putty to connect to your LAMA server.

Run the following commands from the Ubuntu command line:

1.)Download the script from

sudo wget

2.) Run the script

sudo sh

This will start alot of commands.  You will have to watch it for the first few minutes to tell the package manager to download needed packages.

When it is done downloading packages, it will go out to the internet and download the source files and compile.  This will take some time.  

At the end of the script, you should have a complete working LAMA server.


Next in tutorial: .. Setting up Samba File sharing to copy your windows files to your LAMA server


Getting your Ubuntu Server Hardy Heron installation Ready


This is part of the LAMA – Best of all worlds tutorial
LAMA Tutorial Home Page

Ubuntu Server 8.04 LTS

Ubuntu just released thier newest version,  8.04 LTS.  This is what we are going to use for our LAMA server.
Download Ubuntu Server from Ubuntu’s Web Site

It will be an ISO image.  Burn this ISO to a CD.

If you dont have a spare computer around, but still want to test out your LAMA server,  download 
VMware Server, free edition from VMware Server Site and install Ubuntu 8.04 server in a virtual server. 

Please see Ubuntu’s site for System requirements for your hardware.

Install Options
During your install of Ubuntu,  you will be asked many questions.  Most of them are self-explanitory.  When it asks about what features you want with your server install choose:
-Lamp Server (Installs Apache, Mysql, and PHP)
-OpenSSH Server (For connecting remotely to your server via Putty)
-Samba File Server (To copy files easily from Windows to your Server)


Setting up Mono and Apache for

To get to the latest version of Mono, we are going to install Mono from source and compile.  Scary?  No.  Not with these simple steps. Just follow the steps, it does take some time to compile, but you will get thru it.

Once you have your install of Ubuntu 8.04 server ready, click to the next page to get started with the Mono Installation.

Next .. Installing Mono onto your LAMA Server