Search code examples
asp.net-mvcmacosiis-7monovirtual-machine

Lightest way to run IIS on Mac?


I have an ASP.NET MVC 4 app that I would like to run on a Mac machine. I would hate to run a full blown Windows virtual machine when all I really need is IIS7 to run the MVC app. What is the lightest way to run this (VirtualBox, Parallels, IIS7 Express, etc)? Really my goal is to code the Javascript/client-side of the app on my Mac and I am trying really hard not to do my development on a Windows machine :)


Solution

  • BEWARE: The below answer is very old and I don't delete it just for historic purposes. These days I would recommend to install ASP.NET Core along with .NET6. After you have set that up, there are different ways to expose your web port in production, such as NGinx reverse proxy, or Kestrel or other things that I haven't researched much these days.

    Follow this link (provided by @LexLi in a comment above) to know how to set up your MVC environment.

    With regards to IIS, as far as I know it cannot be done. You should use the native web server of your operating system. IIS doesn't run on Mac, so I guess you should try Apache, and then install module "mod_mono".

    Or if that gets too hairy, just use the standalone mono web server called XSP.

    Or run FastCGI, or nginx.

    It is all explained here: http://www.mono-project.com/ASP.NET