Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Tutorials and resources on using ASP.NET and boo to develop web-based applications.

It is possible to run ASP web applications that are coded with boo, either inline in the aspx page, or as a separate boo file which the aspx page inherits.

We don't have much documentation about using ASP and boo here yet though.

For now see this Learn ASP.NET page for many useful links.

Note about inline boo code

First, use Language="Boo" in your aspx files. See the examples included with boo under the examples/ folder.

Secondly, apparently you need to indent your methods using exactly 4 spaces, such as in this example:

Code Block
<script runat="server">
    def Page_Load(Sender as Object, E as EventArgs) :
        HelloWorld.Text = "Hello World From Boo in ASP!"

To see the code ASP.NET generates, look under "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files" or a similar folder for the version of .NET you are using.

Running the boo samples under Cassini

See the boo samples under the examples/ folder.

To run these (on Windows) you need to install nant to compile the examples, and the free Cassini web server to run the examples.

titleProperly Installing Cassini

After you download Cassini and run the installer to install it to C:\Cassini, you also need to add Cassini.dll to the .NET Global Assembly Cache (GAC). Otherwise, you'll get an error when you run Cassini that the port cannot be used.

To do this, go to Control Panel -> Administrative Tools -> Microsoft .NET Framework 1.1 Configuration. Click the Assembly Cache item on the left, then click the "Add an Assembly to the Assembly Cache" link and add the Cassini.dll from your Cassini folder.

Now edit the examples\\ file and change the path to CassiniWebServer.exe (or else add C:\Cassini to your PATH environment variable). You may also want to add nant to your PATH if you have not already.

titleSetting the PATH environment in Windows

Right click My Computer, select Properties, click the Advanced tab, then the Environment Variables button. Under user variables, select Path then click Edit. Add a semicolon ; to the end of the string, followed by C:\Cassini or whichever path you are adding. Add ";C:\nant\bin" too if that is where you installed nant.

Then type "nant" on the command line to compile it and "nant run" to run it.

titleUsing the Windows Command Line

If you are unfamiliar with using the Windows command line, to open the command line tool go to the Start menu and choose Run, then enter cmd.exe. Then cd (change directory) into the folder with the examples and type nant and then nant run.

Alternatively, if you install the "Open Command Window Here" powertoy from Microsoft, you can just right click the folder and select open command here.

Press start in Cassini and then go to http://localhost:8088/. You should see this page:

Click the links to run the examples.