Mono XSP: Open Source ASP.NET Development - How to Develop ASP.NET on a Linux Computer

in #utopian-io8 years ago

ASP is now considered very much 'last century' and has generally been superceded by ASP.NET - both of which have been produced by Microsoft; and that, of course, is the one fact that may deter some web site developers from using it (especially if they come from a Linux background). However, that is no longer an issue - thanks to the Mono's XSP.

What is Mono?

Mono is an open source implementation of ASP.NET which fully supports ASP.NET version 1.1 and most of ASP.NET version 2.0.

What is XSP?

XSP is a standalone lightweight web server designed specifically to support Mono.

Installing Mono and XSP

Installation of both Mono and XSP is very easy:

image.png

  • many of the Linux distributions have their own versions of both Mono and XSP, for example with Debian Linux it's just a matter of using the apt-get command to install the software:

-sudo apt-get install mono
-sudo apt-get install mono-xsp

Once the software has been installed then the developer will need to create a new directory - this will become the home directory for the XSP web server:

cd
mkdir mono

Next the server will need to be started from the new directory:

cd mono
xsp

At this point the user will receive confirmation that the XSP web server is running:

Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /home/bainm/mono
Hit Return to stop the server.

The XSP web server will now be up and running

A Simple Example of an ASP.NET Web Page

The XSP web server is almost ready for use, however it still needs an index page, something simple like:

<%@ Page Language="C#" %>
<html>
<body>
<%
Response.Output.Write("Greetings from the XSP Web Server");
%>
</body>
</html>

This first web page must be named index.aspx and must also be placed in the XSP home directory (the one in which the xsp command was run).

Accessing the XSP Web Server

Once the index.aspx is in place the server can be accessed via the default port 8080 - so the next stage is to open up a web browser and type in the correct url:

http://<my server>:8080/

Changing the Home Directory and Default Port

It is, of course, not always convient to start XSP from the current directory or to use the default port - if that's the case then they can both be defined when starting the server:

Conclusion

By installing the Mono XSP server anyone with a computer, be it Linux or Windows, can start developing their own ASP.NET applications, or even just learning how to use this powerful and adaptable software.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @elissa I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.13
TRX 0.34
JST 0.035
BTC 108074.45
ETH 4399.12
USDT 1.00
SBD 0.83