How does running ASP.Net on Linux compare to the standard Microsoft-centric solution?(在 Linux 上运行 ASP.Net 与以 Microsoft 为中心的标准解决方案相比如何?)
问题描述
我知道可以使用 Mono 和 Mono 在 Linux 上开发和托管 ASP.Net 站点a href="http://www.apache.org/" rel="nofollow noreferrer">Apache,但我想知道它的工作原理以及它是否值得麻烦?我更喜欢开源,但对于这个项目,我想要最快、最简单、最可靠的解决方案.
I know its possible to develop and host an ASP.Net site on Linux using Mono and Apache, but I'd like to know how well it works and if its worth the hassle? I prefer open source, but for this project I want the quickest, easiest, most reliable solution.
我将要构建的站点将是一个使用 MySQL 的相当基本的 ASP.Net 站点.
The site I'll be building will be a fairly basic ASP.Net site using MySQL.
我想知道是否有其他人在像我这样的情况下有使用 Mono 的经验,以及项目进展如何.与使用以 Microsoft 为中心的解决方案相比如何?
I'd like to know if anyone else has experience using Mono in a situation like mine and how the project went. How did it compare to using a Microsoft-centric solution?
我知道 Mono 仍然有些不完整,但我希望我不需要它缺乏的功能.
I know Mono is still somewhat incomplete, but I'm hoping I won't need the features it lacks.
这个问题可能有点两极分化".大多数类似的问题似乎都得到了非常支持微软或支持 Linux 的人的回答.我希望得到一些公正的回应,最好是来自有使用这两种方法经验的人.
This question may be a bit "polarizing". Most similar questions seem to have responses from people who are either very pro-Microsoft or pro-Linux. I'm hoping for some unbiased responses, preferably from people with experience using both.
推荐答案
大约一年半前,我从以 MS 为中心的解决方案转换,现在我在 Linux/Mono/Apache 上托管我所有的网站和 Web 项目/MySQL 基于虚拟服务器(我最初使用 nginx 而不是 apache,但 mono-fastcgi-server 随机导致 thrashing,所以我选择 apache 作为 Web 服务器).我可以将我对这种配置的(主观)经验总结为几点:
I switched from MS-centric solutions about a year and a half ago and now I'm hosting all of my websites and web projects on Linux/Mono/Apache/MySQL based virtual servers (I was originally using nginx instead of apache, but mono-fastcgi-server was randomly causing thrashing, so I choose apache as a web server). I can summarize my (subjective) experience with this configuration into a few points:
适应 Linux 和基于 MS 的环境之间的差异可能需要一些时间(如果您以前从未使用过 Linux),但我不后悔这个决定.对我帮助很大的是为特定技术(例如单并行环境、apache 虚拟主机配置、处理某些问题)创建安装和配置过程,这些过程大多可重复且可以自动化.
It can take some time to get used to difference between Linux and MS based environments (if you never used Linux before), but I do not regret this decision. What helped me a lot was creating installation and configuration procedures for particular technologies (for example mono parallel environments, apache virtual hosts configurations, dealing with certain issues) which are mostly repeatable and can be automated.
您仍然可以使用 Visual Studio 开发您的应用程序,然后将它们部署在 Linux 机器上.如果您使用这种方法,最好定期在单声道上测试您的应用程序是否存在可能的不兼容性.
You can still use Visual Studio to develop your applications and then deploy them on Linux machine. If you are using this approach it's a good habit to test your apps regularly on mono for possible incompatibilities.
我通过 FTP 部署 Web 应用程序,这可能是最简单的方法(也许 WinSCP 更简单,因为您不必设置 FTP 服务器,但这取决于您的偏好).
I deploy web applications via FTP which is probably the easiest way of doing it (well maybe WinSCP is even easier, because you don't have to set up FTP server, but it depends on your preferences).
到目前为止,我已经遇到了 2 个使用 Mono/Apache 的案例,其中内存泄漏导致网站不可用.这可能是由我在旧单声道安装中使用的 Boehm 垃圾收集器引起的.我在最近版本的 mono 上使用新的 sgen GC 没有遇到类似问题.
So far I have run into 2 cases with Mono/Apache where memory leak caused unavailability of the website. This was probably caused by Boehm garbage collector which I was using on old mono installation. I haven't had similar problems with a new sgen GC on recent versions of mono.
与 MS 相比,我最喜欢在 Linux 环境中运行 mono 的地方在于,您在执行管理任务时不必一直点击.Shell 对我来说是统一的管理界面,可以加快速度(如果你有一些实践的话).
What I like the most on mono running on Linux environment compared to MS stuff is that you don't have to click around all the time when doing administrative tasks. Shell is for me unified administrative interface which can speed up things (if you have some practice).
这篇关于在 Linux 上运行 ASP.Net 与以 Microsoft 为中心的标准解决方案相比如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Linux 上运行 ASP.Net 与以 Microsoft 为中心的标准解决方案相比如何?
基础教程推荐
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 将 XML 转换为通用列表 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01