Following up on yesterday’s post about running .Net code on OS X, I tried running a simple ASP .net app. I didn’t go for the fancy solution which is to add a mod_mono to Apache because I only wanted to quickly test a sample code. The quick and dirty solution is called xsp and comes with the Mono Framework.
Once you installed the Mono Framework, test XSP by simply going to /Library/Frameworks/Mono.framework/Versions/2.8.2/lib/xsp/test which contains a sample asp.net application. Run the xsp server from that directory by typing xsp.
Listening on address: 0.0.0.0
Root directory: /Library/Frameworks/Mono.framework/Versions/2.8.2/lib/xsp/test
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
XSP is listening on port 8080 and using the current directory as RootDocument. Simply browse to http://localhost:8080 to view the sample application. Press enter in terminal when you’re done to terminate xsp.
Now, you can use a similar method to develop and test your own application. If you haven’t already, install Mono Develop and launch it. Create a new ASP .net Web application project and you’re ready to go.
Before changing anything, simply build the application and, in the terminal, cd to the directory containing your project. Run xsp just as you did before and browse again to http://localhost:8080. You will see the (almost) empty ASP .net app generated by Mono Develop. That’s it. You can not develop your application and easily test it from Mac OS X. This solution is not suitable for anything but basic development or prototyping (and of course not for any kind of production environment) but it’s really good news that we can test a simple asp .net app on OS X. My regards to the Mono Team.