Tuesday, April 25, 2017

host asp.net on linux host

1- install xsp, asp.net standalone webserver
$ sudo apt-get install mono-xsp

2- create a directory call asp.net and create the following file

$ sudo mkdir asp.net
$ cd asp.net

- for debug purpose, Web.Config

        <customErrors mode="Off"/>

- time.aspx
<%@ language="C#"%>
<%@ Import namespace="System.IO" %>

<!DOCTYPE html>
     <h1>ASP Pages</h1>
     <p>The time is <%= DateTime.Now.ToLongTimeString()  %>

3- run xsp to start the standalone webserver
$ xsp

4- to access it use the following url

No comments:

Post a Comment