This page contains my port of mod_mono to windows (Apache 2.0.x and 2.2.x). Then you can run an OSS ASP.NET server on your windows machine :)
The intent of the patch is being the less intrusive as possible with the current code base while being as straightforward as possible to build and run. It contains the suitable makefile (Makefile.win) to compile it using nmake.
- You must have installed the latest 2.0.x or 2.2.x win32 binary version of the Apache HTTP Server
- You must have installed the latest 1.2.x version of mono using the combined installer for windows. Click here
- MS VS.NET 2003
- GNU patch (or anything capable of applying unified difference files
- The awk utility (see 'Related resources' for pointers). It must be named awk.exe and found in the system PATH
You can replace VS.NET with some free MS tool: Microsoft Visual C++ Toolkit 2003 (compiler and basic libraries), Microsoft Platform SDK (contains additional headers and libraries) and Microsoft .NET Framework SDK (contains nmake and other libraries). The binaries provided here since r56267 have been built that way.
- Download the latest patch
- Check out the corresponding revision of mod_mono
- Apply the patch to it
- From a VS.NET command line environment execute "nmake /f Makefile.win APACHEDIR=..\Apache2 _mod_mono_r " where APACHEDIR matches the location where you have installed Apache (the full set of targets and options can be found in the header of the Makefile.win file)
- Take mod_mono.so (from Release folder or from the downloaded zip file) and copy to Apache's modules folder
The configuration is just the same as described in the documentation of mod_mono. If you want that mod-mono-server.exe is executed by mod_mono then you must consider the following limitations:
- If MonoApplications is used, it does not allow to set ':' as part of the path. So if you need to set the drive letter, just use any other of the possible syntax available to setup applications.
- To use ASP.NET 2.0 profile, you must set MonoServerPath to mod-mono-server2.cmd location (the windows installer puts it in mono's bin folder).
The rest of the options must be configured just as with the UNIX version. For more info about configuring mod_mono, read the documentation that comes with the official mod_mono source (mod_mono's INSTALL) or the official mod_mono wiki page. Sample configuration:
LoadModule mono_module modules/mod_mono.so
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx
DirectoryIndex index.aspx default.aspx
Build platform (of the binary version):
- Use the Binary version with debugging enabled (found in debug folder en the zip file) or compile _mod_mono_d target
- Run apache as: "apache.exe -e debug" or "httpd.exe -e debug"
- There should be lots of debug info in your "error.log" file
Any suggestions are welcome ;-)