Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.
/ Space.NET Public archive

PROJECT DISCONTINUED! My C# WebServer that uses PHP-like Scripts but with C#!

License

Notifications You must be signed in to change notification settings

TheBarnyOfBarnim/Space.NET

Repository files navigation

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀PROJECT DISCONTINUED

Space.NET

Information

Space.NET is a platform independent HTTP Server that is running with .NET and the programming language C#. This project was inspired by the well-known HTTP Server Apache. Instead of programming scripts in PHP and the file extension *.php, you write scripts in C# with the file extension *.cshtml.

Feel free to use Space.NET on your own Projects.

⚠️ If you find and issues or you want to contribute, feel free to do so!


Table of Contents


Setting up the Webserver

⚠️IMPORTANT⚠️: First, in order to run Space.NET, you need to install the latest version of .NET

  1. Download the latest Release (Space-NET.zip)
    Extract the archive into an empty folder
  2. Download the latest Template (Template_Root_Folder.zip)
    Extract the Template into another empty folder [ServerRoot]
  3. Execute Space.NET with elevated rights⚠️
    On Windows => Simply execute the Space-NET.exe
    On Linux => execute the Space-NET.dll with an Terminal-Application via the following command: "dotnet Space-NET.dll"
  4. The application will now prompt you to input some settings:
    5.1. The Root folder of your WebServer [ServerRoot].
    The [ServerRoot] Folder is not the folder where the Application is in! 5.2. A comma seperated list of prefixes. Prefixes are basically URL's that the WebServer has to register on the OS.
    Set the Prefix(es) to your Domain Name or IP-Address
  5. After inputting the settings, the WebServer will create the Folder [ServerRoot] with following Sub-Folders:
  • Logs: Log files of the Core and Incomming Web-Requests
  • ErrorDocs: HTTP Error Documents the server can encounter
  • DocumentRoot: The most top Folder a Internet-User can access
  1. The WebServer will now start automaticly!

Executing the Webserver

Execute Space.NET with elevated rights⚠️
On Windows => Simply execute the Space-NET.exe
On Linux => execute the Space-NET.dll with an Terminal-Application via the following command: "dotnet Space-NET.dll"


Creating a Website

Creating a Website using the template is very easy.
In order to create a dynamic Website you use C# Scripts in plain HTML files (like PHP).
Look into the Documentation of the API, to understand how to write Scripts ith the .cshtml file extension.


Debugging a Script

Debugging a Script is very easy: If the script could not compile or it get's a runtime Exception, just look at the Page in your browser!

⚠️ An option to disable the display of the Exception for the User will be soon inplemented in the Config.json.