4

Why would Mono not being able to run under IIS 7 ?

Update: what prevent to develop an ISAPI for that purpose ?

user310291
  • 36,946
  • 82
  • 271
  • 487
  • 1
    Erm - why would you want to run Mono on a Windows box (assuming it's Windows as you are talking about IIS!) – DilbertDave Nov 20 '10 at 15:21
  • 2
    @DilbertDave, what if he does not have linux box and he needs to test something that works with mono but built and tested on windows !! – Akash Kava Nov 20 '10 at 15:54
  • 1
    Hmm - fair point but if that's the case then surely you'd run it through Apache (on a Windows box) not IIS because that will not run on a Linux OS. – DilbertDave Nov 20 '10 at 16:57
  • I desire to run mono in IIS, because I'm ultimately porting all my .net web applications to Mono/Linux. I figured that if got them to consume mono where they are at right now (IIS), the move would then be a piece of cake. However, I'm now learning that IIS don't play Mono directly. Before now, I assumed that installing the mono framework on windows would automatically register the right modules in IIS to serve mono asp.net applications. Bad assumption. – Lonnie Best Apr 09 '11 at 11:13

4 Answers4

5

Mono does not run under IIS 7 because Mono does not have an ISAPI module that implements the right API to interact with IIS 7.

UPDATE: In regards to your question about what prevents you from developing an ISAPI module to do that? Nothing, really. Mono has a good embedding API that you could easily consume from C/C++. My guess is, the reason nobody has done it is because there is not much of a need to do it.

Bojan Rajkovic
  • 1,686
  • 11
  • 14
  • Worth pointing out that Mono does have an XSP Server for Windows though for serving ASP.NET content with Mono. Useful for testing/debugging purposes. –  Nov 20 '10 at 16:05
  • XSP Server for Windows is interesting heard of it but forgot. Now I'd like the other way round. – user310291 Nov 20 '10 at 17:09
2

You shouldn't need to run Mono on IIS7. Mono is a development of the .NET platform primarialy for Linux (and possible FreeBSD et al as well; been a while since I last looked into it).

Thus if you want .NET on IIS7, just install the native Microsoft .NET stack on your Windows server (it's probably already installed).

Is there any particular reason you want Mono instead of Microsoft's offerings?

Chris J
  • 30,688
  • 6
  • 69
  • 111
  • 1
    If I have an existing parc of windows servers and another of Linux massive deployment would be much easier if I can do so on both platforms. – user310291 Nov 20 '10 at 17:05
  • 3
    I mean in a world wide company with many subsidiaries where each subsidiary can have one or the other system, if Mono could be deployed in both environments that would be real benefit. – user310291 Nov 20 '10 at 17:06
2

First, develop ISAPI is tough. See how many problems PHP ISAPI used to have and how it gradually migrates to FastCGI. Don't waste efforts on that dead end.

Second, use FastCGI to drive XSP may be an easier approach, but Microsoft only provides FastCGI for PHP. Not sure how that can be reused for XSP.

Using Mono of course has its own values, as you have access to XSP and Mono source code to debug any tough issues.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
2

It may be possible to get mono to work with IIS using FastCGI: http://www.mono-project.com/FastCGI

You can install FastCGI on IIS here: http://www.iis.net/download/fastcgi

Configure FastCGI by opening this file with notepad:

c:\WINDOWS\system32\inetsrv\inetsrv

For example, I run php on iis through fastCGI by adding the following 3 lines to the bottom of this file and then save:

php=PHP
[PHP]
ExePath="C:\Program Files\PHP\php-cgi.exe"

So my wild guess for mono would be maybe:

aspx=ASP
[ASP]
ExePath="C:\Program Files\Mono-2.10.1\bin\mono.exe"

Of course there'll be more to it than this, and my guess is only intended to spark an idea for someone...

Lonnie Best
  • 9,936
  • 10
  • 57
  • 97