Configure mono, xsp asp.net applications in Ubuntu
So i was fiddling around on the Internet and i ran back into Mono again, and seeing as i spent some time with C#, windows and ASP.NET b4 switching to Ubuntu, PHP, Ruby, Rails i decided i would check out mono and try install it. Initially had two options. Synaptic or the apt-get…. And apt-get it was. So this is how i got mono and monodevelop running on my Ubuntu Feisty box.
1.
Fire up the terminal and type in.
$ sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol
This will install the Mono base and get you ready to actually use mono but as for the testing and deployment of WEB APPLICATIONS that is another story. Enter XSP the C# based web server that you can deploy your web apps.
2.
To install the ASP.NET 2.0 environment
$ sudo apt-get install mono-xsp2 mono-xsp2-base asp.net2-examples
and to install ASP.NET 1.0 environment
$ sudo apt-get install mono-xsp mono-xsp-base asp.net-examples
3.
Time to deploy
. Now if you have any Rails experience then this would be similar, in the terminal enter
For the ASP.NET 2.0 environment
$ cd /usr/share/asp.net2-demos/
$ sudo cp /usr/share/asp.net2-demos/index.aspx /usr/share/asp.net2-demos/index2.aspx
$ xsp2
For the ASP.NET 1.0 enviroment
$ cd /usr/share/asp.net-demos/
$ sudo cp /usr/share/asp.net-demos/index.aspx /usr/share/asp.net-demos/index.aspx
$ xsp
Basically the /usr/share/asp.net2-demos/ (NOTE THIS!) is the directory that the demos are installed in on a Ubuntu’s Feisty however, this is important because if you look on how to install on other distros this is some other foreign directory. seeing as we want to deploy the ASP.NET 2.0 application we enter
xsp2 which invokes the web server for ASP.NET 2.0 applications and in the terminal you should see something like this
“xsp2
Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /usr/share/asp.net2-demos
Hit Return to stop”
Now point your browser to http://localhost:8080 and voila you are good to go.
4.
I personally dont like to tinker with the files here so i opened up a folder browser and moved the asp.net-demos from /usr/share/asp.net-demos/ to home/timani/web_dev where i like to do my development but you can move them anywhere and then just remember to change your directory and invoke the xsp server from here, in the terminal like this
$ cd /home/timani/web_dev
$ xsp
Catches:
You go to http://localhost:8080 in step 3 and get this error
”
Server error in ‘/’ application
File ‘/’ not found.
Description: Error processing request.
”
Please remember that you have to be in the directory that the ASP.NET project resides in before you can start up the server or you will get an error.
Remember : $ cd /usr/share/asp.net-demos/
3 Responses to “Configure mono, xsp asp.net applications in Ubuntu”
Leave a Reply
You must be logged in to post a comment.












[…] followed Timani’s first post to the letter. Everything was fine and dandy and the xsp2 webserver was happily serving on port […]
[…] In order to make aspx pages to work we have to configure and test the xsp2 web server.Detailed description that I followed can be found on Timani’s Blog. […]
[…] In order to make .aspx pages to work we have to configure and test the xsp2 web server.Detailed description that I followed can be found on Timani’s Blog. […]