English 中文(简体)
ASP. Net MVC onosphere/Mono
原标题:ASP.Net MVC on Linux/Mono

I am thinking of developing a website using the ASP.Net MVC framework on Linux. I would like to know:

  • what are the best practises for developing such a site (are they any different for mono/ Windows)?
  • any gotchas I should be aware of
  • any (material diffeences) - e.g. missing/proprietary libraries/componenst between Mono and .Net
  • are there any special directives, modules required to run Mono with Apache?
  • Are there any performance differences between a site hosted on Windows/IIS and Linux/Apache?
  • I intend to do most of my development using VS Studio - can the site be developed using VS and then deployed on Linux?

I am aware that this question has been asked several times here on SO. However, most of the questions date back to 2008 or 2009 - which is a very long time in internet time. Things may have moved on since those answers - so those answers may no longer be relevant.

我不得不指出,我是NOT有兴趣在视窗服务器上接收该网站,因此,我只有兴趣了解用于部署第1737(2006)号决议服务器的工作。

问题回答

I am currently working on a MVC 4 app and we are using Mono. If you are just planning to have a basic website, you should go for it. But for more complex flows, honestly, I think you should do a little bit of research first, to see if the features you want to implement are supported in Mono. Things you should consider:

  • only a set of restricted libraries are supported on mono ( for example, right now we are having some issues due to the fact that the mono libraries (Novell and DirectorySearcher) for LDAP do not support pagination)
  • the developing environment will be different than your server env ( I am using Visual Studio, we managed to pass this limitation by adding a lot of logs)
  • we do our publish using FTP, so yes, you can deploy it from VS, using a publish profile set up for FTP
  • it s free, but it will take a lot of time to research & do special thinks just for the sake of Mono
  • not a lot of documentation available, because not a lot of people use it, so if you have a specific problem, it will be more difficult to solve

我的经历是2011年,但我很相信,你将不得不试验,看看工作,看看我对莫诺的经验。

你的大多数问题非常广泛,我认为你的问题将很快结束。

至于您的最后一个问题,这就是我如何工作(在VS->deploy, 投向Liber),但你必须认识到:

  • just because your code will work in the VS debugger it doesn t mean it will work when deployed;
  • there is no one-to-one mapping between Mono and .Net. Even when things work it doesn t mean they will work the same way. For example the implementation of the encryption code used for http cookies was very different between mono and .net.




相关问题
What are some things Mono is not a good fit for?

I ve started your typical web project from scratch using the Mono platform. You know, web services, a UI, MySQL database, all that. I ve heard around the net that it s not a picture-perfect ...

How Reliable is Mono on Linux vs .NET on Windows?

I am trying to decide upon using Mono with C# or Python (Django) for a Linux based Web Site. My concern with C# is that Mono may not be as reliable as .NET. Does anyone have any experience with this?

System.Data in Mono

Has System.Data in Mono been expanded to include extra functionality? I m attempting to make use of the SQL Parser written for Mono in Mono.Data.SqlExpressions but when all the classes in the ...

Basic MEF workflow/usage

I m looking to a framework which will allow me to have a simple plugin system in my .NET application. It seems MEF is the framework which Microsoft is endorsing, and will become part of .NET 4 (it ...

In Mono/Gnome, how can I look up the icon for a mime type?

Gnome.Icon and Gnome.ThumbnailFactory both want me to pass in a URI of a file whose icon I want -- I only have a MIME type, which I want to look up an icon for. Is there a GNOME C# API function which ...

ASP.NET MVC 2 on mono

Is it possible to run the new ASP.NET MVC 2 Preview 2 on mono?

热门标签