Get your AjaxPro Web Application running on Mono (for Linux Dummies)

Michael Schwarz on Friday, November 17, 2006

For all of us who are not familiar with Linux here is a short description how to get your ASP.NET web application using AjaxPro [1] running on Mono [2]. The Mono project offers a great VMware virtual machine (Suse) which you can download here [3]. There is a free VMware player [4] which you need if you don't have the VMware workstation.

Next you can download the VMware virtual machine, see more details here [5].

Ok, I get it working, but how can I put my files to the linux virtual machine? The next procedure is for having Linux "export" a Windows Share that can be mounted from Windows (instead of the other way around).

This is for the VMWare 1.1.18 image, but Miguel will add missing file sharing support in the future VMware images to let Windows developers (sometimes are big Linux beginners) easly test Mono with their .NET applications:

1. Open a console, and type "su" to become root. 2. Type the password "mono" 3. Run: chkconfig smb on 4. Run: smbpasswd -a mono Give it a password

This will expose the user "mono" to the world, and use that password

5. From Windows, access the following path:

\\IPADDRESS\mono

6. Close the terminal, this is only needed the first time.

7. Enter `mono' as the login, and the password provided as the password.

This is done in subsequent times.

For upgraded VMware images or complete SUSE linux images, you do:

1. From the main menu, select "Control Center" 2. Open Administrator Settings. 3. Select "Network Services" 4. Select "Samba Server" 5. Click on "Allow users to Share their directories" 6. on the "Start-up" tab, make sure that "Service Start" says "During Boot" instead of "Manually: 7. If "Firewall is enabled, click "Open Port in Firewall"

Next you can simple copy your web application files to the Linux machine and start the web server. For this the Mono project developers have added the smaller web server (which you can compare with the built-in web server in Visual Studio .NET 2005) which is called XSP.

1. Start a terminal i.e. Gnome Terminal from the start menu 2. Change to the directory where you put your files using "cd" 3. Run xsp --port 8080 4. Open Firefox or any other web browser and open http://localhost:8080/ [6] inside the virtual machine or use the IP address instead of localhost.

If you have any trouble getting your ASP.NET web application running with AjaxPro on Mono feel free to post your questions at the Google AjaxPro group [7].