How does running ASP.Net on Linux compare to the standard Microsoft-centric solution?

前端 未结 3 960
梦如初夏
梦如初夏 2021-02-14 17:03

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 sourc

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-14 17:44

    Hosting ASP.NET on mono from my experience is quite easy and fast. i has been host multiple of my project using Mono ASP.NET MVC 1 / 2 using MySQL and PostgreSQL, serve by Apache mod_mono.

    Compared with deployment on Windows Server. It quite narrow when using modern linux distribution which already provides all package to deploy mono ASP.NET. the only drawback is you have to make sure your Web Application portable enough in term of IO accessing and only very short learning curve and experience needed to debug and publish your project.

    For Deploying our project in Linux. It easy using Version Control (VS) such as Mercurial or Git if u have fully control on the server. If U have more experience using continues integration is more better. I mainly using mercurial so step bellow is the step i usually do, but i think it almost similar for Git:

    • Install mercurial, and configure mod_wsgi, hgweb.wsgi and hgwerb.config
    • Init VS repo and publish at hgweb.config and configure hook to update and invoke xbuild to automatically build when u push it
    • publish the repo (web part) as mono application at mod_mono.conf
    • So u just need to code at visual studio, commit and push your changes using tortoiseHg without event login to server (set repo url, user and password at your repo hgrc)

提交回复
热议问题