zoukankan      html  css  js  c++  java
  • Running ASP.NET Applications in Debian and Ubuntu using XSP and Mono

     

    Mono is an open-source project providing the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Monodevelop is probably the best IDE for developing .NET applications on Linux. In order to install and use it for development, you will also need the Mono .NET runtime environment installed.

     Mono has a fully functional implementation of ASP.NET. This includes full support for ASP.NET Web Forms and Web Services. This essentially means that more or less any ASP.NET application that you have developed using with the .NET Framework will work with Mono. Obviously there might be changes needed, such as data access changes, removal of any
    reliance on .NET Framework BCL types that are not implemented in Mono yet, and also the removal of any code that makes
    use of platform invoke and so on. At this stage the ASP.NET support in Mono can be considered as excellent and a lot of
    publicly available web applications already make use of Mono’s ASP.NET support.

    when using ASP.NET with Mono you have two options as regards which web server to host your ASP.NET applications that is XSP and Apache we are using here XSP.

    XSP

    XSP is a “light-weight web server” capable of hosting and serving ASP.NET applications. It is written using C#, making extensive use of the classes in the System.Web namespace.XSP web server runs on both the Mono runtime and also on the .NET runtime.

    Now we are going to take a look how to install XPS and mono for ASP.NET applications and testing this setup

    First thing is you need to install mono

    Install mono in Debian

    If you want to install mono in your debian system you need to run the following command

    #apt-get install mono mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol

    You can can see in this screen which will install all the required packages

    Install mono in Ubuntu

    If you want to install mono in your Debian system you need to run the following command

    sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol

    Install XSP Web server in Debian

    If you want to install ASP.NET2.0 version use the following command

    #apt-get install mono-xsp2 mono-xsp2-base asp.net2-examples

    If you want to install ASP.NET1.0 version use the following command

    #apt-get install mono-xsp mono-xsp-base asp.net-examples

    This will install all the required development environment and sample applications

    Install XSP Web server in Ubuntu

    If you want to install ASP.NET2.0 version use the following command

    sudo apt-get install mono-xsp2 mono-xsp2-base asp.net2-examples

    If you want to install ASP.NET1.0 version use the following command

    sudo apt-get install mono-xsp mono-xsp-base asp.net-examples

    This will install all the required development environment and sample applications for ASP.NET

    Test ASP.NET Applications

    We have already installed sample applications

    If you want to run ASP.NET 2.0 application you need to go to /usr/share/asp.net2-demos/ run the following command

    #xsp2

    This will start the XSP with ASP.Net 2.0 application

    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 the server.
    Application_Start

    Now you need to point your web browser to http://localhost:8080/

    You should seen the following screen

  • 相关阅读:
    Win10如何关闭自动更新服务
    Windows10 【系统周期表】【系统下载表】【大型软件表】
    Win10如何设置开机自动登录
    Win10《芒果TV》发布两周年纪念特别献礼,陪你度国庆,好礼送不停
    Win10《芒果TV》商店版更新v3.7.0卡牌版:为小冰生日献礼,为秋季创意者更新铺路
    Win10《芒果TV
    Win10《芒果TV》更新v3.6.0秋收版:新增追剧磁贴、记忆续播、跳转列表
    Win10《芒果TV》更新v3.5.2星玥版:修复电视台直播异常,优化添加下载提示
    Win10《芒果TV》更新v3.5.0夏至版:会员尊享蓝光画质,关联本地视频播放
    [Cocos2d-x for WP8学习笔记] 获取系统字体
  • 原文地址:https://www.cnblogs.com/lexus/p/2327775.html
Copyright © 2011-2022 走看看