Archives
-
Monoppix - CSC Quickstart Walkthrough
This quickstart was written by Roiy Zysman and is included in the Monnopix ISO [ monoppix-v0.2.2.3.iso 404 MB].
The following steps will show you how to write a small Mono program, compile and execute it
1.Once the Initialization stage is over , open up the kwrite text editor.
2.Enter the following text:
using System;
public class Test
{
public static void Main()
{
Console.WriteLine("We got mono...");
return;
}
}3.Save as /tmp/test.cs
4.Open a terminal window by clicking on the panel 'shell' button
5.execute the following commands in the terminal window:
- cd /tmp
- mcs test.cs
- mono test.exe
-
Monoppix - Basic XSP (ASP.NET) and Monodevelop Walkthrough
Monoppix is a GNU/Linux distribution which includes Mono, XSP, and Monodevelop, and runs completely off a CD. It allows you to get familiar with Mono development in Linux without installing anything on your computer.
This walkthrough was written for Monoppix 0.2.2.3. It will step you through:
- Downloading the Monoppix ISO
- Burning the ISO to a bootable CD
- Running Monoppix off the CD
- Starting the XSP server
- Testing an ASPX webservice
- Editing the ASPX file in Monodevelop
- Saving the ASPX file to your /home/knoppix/ directory
- Restarting the XSP server in your /home/knoppix/ directory
- Verifying your changes
- Quick info on taking screenshots in Monoppix (or any Knoppix)
1. Download the Monoppix ISO
The Monoppix ISO is available from http://monoppix.url123.com/download [404MB]. The download goes through Freecache which should ensure a high speed download.
2. Burn the ISO to a bootable CD
The easiest ways to burn an ISO to a bootable CD in Windows are:
- Nero, using the CD-ROM (BOOT) option
- ISORecorder (free, XP SP2 or Windows 2003 need to use the ISORecorder v2 beta release)
- CDBurn (part of free Windows 2003 Resource Kit, works on Windows XP, command line only)
3. Running Monoppix off the CD
Make sure the CD is in the CD drive and restart your computer. If it boots in your normal operating system, reboot again and change the start device priority in your BIOS to set the CD drive to higher priority in the boot order than the Hard Drive. At the prompt, you'll need to enter a Knoppix cheat code to tell Knoppix what hardware to use. If you're using standard equipment, you're probably okay with just "knoppix" (without the quotes). If you're using a laptop or LCD monitor, "fb1024x768" will probably work.
4. Starting the XSP server
Open a console window (the taskbar icon that looks like a shell). Type the following command:cd /usr/share/doc/xsp/test && mono /usr/bin/xsp.exe
This will start up the XSP server. You should see the following:
Next, open a browser. Monoppix includes Konqueror (the taskbar icon on the right) and Mozilla (in the Start menu). Browse tohttp://localhost:8080/
5. Testing an ASPX webservice
Click on the second link, TestService.asmx. Click the "Add" link on the left, then the "Test Form" link on the top. Enter two integers and submit the form:
6. Editing the ASPX file in Monodevelop
You'll need to start Monodevelop from the command prompt in this release. Open a console window and type the following:/KNOPPIX/usr/bin/monodevelop monodevelop
Select File / Open from the menu, then browse to /KNOPPIX/usr/share/doc/xsp/test. Open the TestService.asmx file.
Edit the code. My changes to the code are underlined below; feel free to make whatever changes you'd like as long as it compiles.
<%@ WebService Language="c#"
Codebehind="TestService.asmx.cs"
Class="WebServiceTests.TestService" %>
using System;
using System.Web.Services;
using System.Web.Services.Protocols;
namespace WebServiceTests
{
public class TestService : System.Web.Services.WebService
{
[WebMethod]
public string Echo (string a)
{
return a;
}
[WebMethod]
public string Add (int a, int b)
{
return String.Format("Here is your total:{0}",a+b);
}
}
}
7. Saving the ASPX file to your /home/knoppix/ directory
Since the TestService.asmx file is located on the CD, you can't save your changes there. You can save files to the /home/knoppix/ directory, though, since that's located on the RAM drive. Select "File / Save As...", navigate to /home/knoppix/, and save the file:
8. Restarting the XSP server in your /home/knoppix/ directory
If the console window from step 4 is still open and running XSP, select the console window and press Enter (or Return, if you have a really old keyboard) to close XSP.
In a console window, type the following command:
cd /ramdisk/home/knoppix/ && mono /usr/bin/xsp.exe
9. Verifying your changes
Refresh your browser window if it is still open, or open a browser and navigate tohttp://localhost:8080/TestService.asmx
Verify that your changes have taken effect. In my example, I changed the output from a simple integer value to "Here is your total: xx". Well worth the hours of work:
10. Quick info on taking screenshots in Monoppix (or any Knoppix)
Monoppix doesn't include Ksnapshot. I took these screenshots with xwd. I used the following command:
xwd | xwdtopnm | ppmtojpeg > /home/knoppix/filename.jpg
-
XP SP2, IE, the Local Machine Zone Lockdown, and you
XP SP2 is especially tough on content running in the Local Machine Zone (meaning html files running on your desktop, a CD, or elsewhere on your machine). XP SP2's changes to the LMZ prevent all active content, including Javascript, Java, ActiveX.
-
Google Releases Gmail Notifier
If you want POP access to GMail, there's PGtGM. If you just want a notification, there's now an official GMail Notifier:
Philipp Lenssen writes "After several unofficial, screen-scraping Gmail utilities, Google now released the official Gmail Notifier (Beta) for Windows. It will sit in the Windows tray, alerting you of new emails in your account (if you are lucky enough to have one already). Additionally, the Gmail Notifier can connect 'mailto:'-links in web pages to Gmail."
[Via Slashdot: ] -
Today's controversy is brought to you by the letter J
First, Tony posts an innocuous message about the XP SP2 updates to IE on the IEBlog:
-
weblogs.asp.net / .TEXT admin now supports Firefox
The recent upgrade to .TEXT admin includes an upgrade to FreeTextbox 2.x, which means it now supports Firefox / Mozilla. Firefox has supported WYSIWYG HTML edit mode for a while, it just needed to be turned on.
-
XP SP2 to RTM very very soon / Some SP2 gotchas
UPDATE:
XP SP2 Release Schedule
5th August RTM Announcement
10th August RTW (release to web)
24th August Windows Update/Automatic Updates release
[via NeoWin] -
More ASCII Art
A few recent posts on the weblogs.asp.net feed [1 2 3] reminded me of a some code I wrote a year ago and have been meaning to post.