Mono 下的 ASP.NET 可以运行在哪些 Web 服务器上?
Mono has an implementation of ASP.NET 2.0, ASP.NET MVC and ASP.NET AJAX.
Quick Resources:
- ASP.NET FAQ for common questions on ASP.NET.
- Hosting on Apache servers.
- Hosting with FastCGI-based servers.
- Hosting with CGI-based servers.
- Hosting with Nginx.
- Porting ASP.NET applications.
Mono's ASP.NET implementations supports two kinds of applications:
- Web Forms (Web Applications infrastructure).
- Web Services (the SOAP-based RPC system).
Status and tests for ASP.NET 2.0 are available in our ASPTests page.
Running ASP.NET applications
To run your ASP.NET applications with Mono, you have three classes of options:
- Apache hosting: use mod_mono, a module that allows Apache to serve ASP.NET applications.
- FastCGI hosting: use the FastCGI hosting if you have a web server that supports the FastCGI protocol (for example Nginx) for extending the server. You also may use a web server that only has support for CGI using cgi-fcgi.
- XSP: this is a simple way to get started, a lightweight and simple webserver written in C#.
For deploying applications, we recommend the use of the mod_mono or FastCGI approaches, as that will give you all the configuration options and flexibility that come with using Apache or a FastCGI server.
For quickly getting started, get familiar with Mono and ASP.NET, XSP is the ideal solution. Keep in mind that XSP is a very limited server and is only useful to get acquainted with ASP.NET and Mono, it only support HTTP 1.0 and does not provide much extensibility or configuration.
More advaned users can use the HttpListener and the ASP.NET hosting to create their own hosts for ASP.NET applications.
ASP.NET hosting with Apache
The mod_mono Apache module is used to run ASP.NET applications within the Apache web server.
The mod_mono module runs within an Apache process and passes all the requests to ASP.NET applications to an external Mono process that actually hosts your ASP.NET applications. The external ASP.NET host is called "mod-mono-server" and is part of the XSP module.
To use this, you must download and install the mod_mono and xsp components of Mono. mod_mono contains the actual Apache module, and xsp contains the actual ASP.NET hosting engine, both are available from our download page.
See the mod_mono page for details on installation and configuration.
ASP.NET hosting with Nginx
Nginx is a high-performance HTTP server which support running ASP.NET and ASP.NET MVC web applications through FastCGI protocol. See the FastCGI Nginx page for details on installation and configuration.
ASP.NET hosting with XSP
XSP is a standalone web server written in C# that can be used to run your ASP.NET applications with minimal effort. XSP works under both the Mono and Microsoft runtimes. The code is available from our download page (look for XSP web server) or from the Anonymous SVN repository (module name: xsp).
The easiest way to start XSP is to run it from within the root directory of your application. It will serve requests on port 8080. Place additional assemblies in the bin directory. Other XSP options can be set on the command line, such as the application directory and the port to listen on.
XSP comes with a set of pages, controls and web services that you can use to test the server and see what ASP.NET looks like.
For example, once you install XSP, you can try some samples like this:
$ cd /usr/lib/xsp/test
$ xsp
Listening on port: 8080
Listening on address: 0.0.0.0
Root directory: /home/cvs/mcs/class/corlib/Microsoft.Win32
Hit Return to stop the server.
You can now browse to http://localhost:8080 and see various sample programs
SSL support in XSP
XSP supports SSL and TLS Client Certificates. For further details about setting it up, see the UsingClientCertificatesWithXSP document.
Configuration
Applications can be configured through the web.config file, the full documentation is available from MSDN, and also a Mono-specific version is available on this site here.
Additionally, you can configure Mono-specific ASP.NET settings (to have applications that behave differently depending on the operating system they are deployed in) using the ASP.NET Settings Mapping engine.
Other extensions
Check out ASP.NET Modules for details on how to support deflate/gzip encodings and authentication.
Debugging
By default xsp and xsp2 run in Release mode, which means that debugging line-number information will not be available in stack traces when errors occur.
To obtain line numbers in stack traces you need to do two things:
1. Enable Debug code generation in your page. 2. Run Mono with the --debug command line option.
You must enable debug code generation in your page using the Debug="true" in the top of your page, or setting the compilation flag in Web.config (compilation option).
Use the --debug command line option to Mono, this is done by setting the MONO_OPTIONS environment variable, like this:
$ MONO_OPTIONS=--debug xsp2
Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /tmp/us
Hit Return to stop the server.
To do the same with the Apache mod_mono module, use the MonoDebug true directive in your apache configuration file.
Supported Versions
Mono supports ASP.NET 2.0, ASP.NET AJAX and a handful of 3.5 controls.
Limitations
Mono's ASP.NET does not implement the following features:
- Precompiled updatable web sites.
- WebParts APIs.
Work in Progress
SVN access
Users interested in the latest version of mod_mono and xsp can retrieve these from our public anonymous SVN repository. The module names are mod_mono and xsp respectively. You will also need to check out the mcs module as the System.Web classes are in mcs/class/System.Web.
Designer
There is work in progress on an ASP.NET Designer the designer will eventually be integrated into the MonoDevelop IDE.
转自:http://www.mono-project.com/ASP.NET
谢谢浏览!
Mono 下的 ASP.NET 可以运行在哪些 Web 服务器上?的更多相关文章
- 解决Win10 中打开VS2012 出现“ASP.NET 4.0 尚未在 Web 服务器上注册”
系统升级为win10后,在使用vs2012打开原来的项目时,会出现“ASP.NET 4.0 尚未在 Web 服务器上注册”的问题,如图: 想到在win8.1系统下,也出现过同样的问题,就直接使用命令提 ...
- ASP.NET 4.0尚未在 Web 服务器上注册 解决方法
使用VS2010创建web应用程序时出现如下提示ASP.NET 4.0尚未在 Web 服务器上注册.为了使网站正确运行,可能需要手动将 Web 服务器配置为使用 ASP.NET 4.0,按 F1 可了 ...
- Win10 兼容性 Visual studio web应用程序 ASP.NET 4.0 尚未在 Web 服务器上注册
系统升级到windows10 ,Visual studio 创建web应用程序时出现如下提示ASP.NET 4.0尚未在 Web 服务器上注册.为了使网站正确运行,可能需要手动将 Web 服务器配置为 ...
- 在IIS7.5上添加.NET4.0程序的虚拟目录时提示ASP.NET 4.0尚未在 Web 服务器上注册
使用VS2010创建web应用程序时出现如下提示: ASP.NET 4.0尚未在 Web 服务器上注册. 解决方法: 首先IIS应用程序池添加 net framework4.0版本. 接着找到C:\W ...
- ASP.NET 4.0尚未在 Web 服务器上注册
ASP.NET 4.0尚未在 Web 服务器上注册 解决方法 使用VS2010创建web应用程序时出现如下提示ASP.NET 4.0尚未在 Web 服务器上注册.为了使网站正确运行,可能需要手动将 W ...
- ASP.NET 4.5 尚未在 Web 服务器上注册。您需要手动将 Web 服务器配置为使用 ASP.NET 4.5,这样您的网站才能正确运行。
系统换成Windows10安装VS2012打开项目总提示:vs2012 aps.NET 4.5尚未在web服务器上注册,您需要手动将Web服务器配置为使用ASP.Net 4.5,这样您的网站才可能正确 ...
- VS2012打开Web项目提示《ASP.NET 4.X 尚未在Web服务器上注册。你需要手动将...》解决方案
用VS12创建的WEB项目时,默认使用IIS Experess开发服务器,但是每次打开会提示如下提示 但是同一个项目用VS13或VS15打开时,就能正常打开,不会出现以上提示信息. 怀疑是IIS Ex ...
- (转)ASP.NET 4.0 尚未在 Web 服务器上注册
安装vs2010的时候忘记先安装IIS7了,导致出现了这个问题.经过网络查询发现解决方法如下: 运行:cmd命令,进入命令管理器, 输入:cd C:\\WINDOWS\\Microsoft.NET\\ ...
- [转][C#]无法创建虚拟目录。ASP.NET 2.0 尚未在 Web服务器上注册。
参考:http://www.bubuko.com/infodetail-997666.html C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet ...
随机推荐
- Git 合并单个文件
有两个分支 # git branch -a * branchA branchB remotes/origin/branchC A分支合并B分支单个文件 注意是本地分支,还是远程分支 # git che ...
- Linux强制关掉其他ssh登录的用户
Linux强制关掉其他ssh登录的用户 首先 用who命令查看登录的iproot pts/0 162.16.16.155 14:30 0.00s 0.07s 0.05s wroot pts/1 162 ...
- Debian x7中如何添加永久环境变量
一.进入/etc/bash.bashrc(使用文本编辑器打开) 二.在最后面添加新的环境变量 export PATH=usr/...(路径):$PATH 三.保存后,打开终端,输入source ~/. ...
- ubuntu 16.04下node和pm2安装
一.安装node,这里安装9.0的版本,安装其它版本直接到https://deb.nodesource.com/setup_9.x找相应版本的更改既可 1.sudo apt-get remove no ...
- 笔记13:Python 和 Elasticsearch 构建简易搜索
Python 和 Elasticsearch 构建简易搜索 1 ES基本介绍 概念介绍 Elasticsearch是一个基于Lucene库的搜索引擎.它提供了一个分布式.支持多租户的全文搜索引擎,它可 ...
- React 借助pubsub-js进行兄弟组件的传递值
1===> raect中两个 兄弟组件 互相通信使用的技术 使用 消息订阅(subscribe)和发布(publish)机制 s儿 伯 s rai b pʌ b lɪ ʃ 有一个库可以处理 Pu ...
- 201871010112-梁丽珍《面向对象程序设计(java)》第十四周学习总结
项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p ...
- 201871010104-陈园园 《面向对象程序设计(java)》第十二周学习总结
201871010104-陈园园 <面向对象程序设计(java)>第十二周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ ...
- 面向对象程序设计(Java) 第4周学习指导及要求
2019面向对象程序设计(Java)第4周学习指导及要求(2019.9.17-2019.9. 23) 学习目标 掌握类与对象的基础概念,理解类与对象的关系: 掌握对象与对象变量的关系: 掌握预定义类 ...
- python27期day09:函数的初始、函数的定义、函数的调用、函数的返回值、函数的参数、作业题。
1.函数的作用:封装代码.大量的减少了重复的代码. 2.全局空间:顶行写的就是全局空间. 图解 : 3.函数的定义: def 是一个关键字.申明要定义一个函数 my_len 函数的名字.遵循变量命名的 ...