Programming · Summer of Code 2007

FastCGI ASP.NET Server Status Report 11

This status report is for the week of August 6 – August 10. This week has continued to see a lot of fine tuning bug fixes.


The Changelog grew by 116 lines this week. Key features are as outlined.

  • “Blocking” property was removed from Mono.FastCgi.Socket. It was only used to disable blocking on a socket that already communicated with asynchronous calls and was causing a problem with Abyss and unmanaged sockets.
  • All headers are now sent in a single batch rather than one at a time. This should reduce the amount of network traffic and prevents Nginx from occasionally losing a request.
  • Added documentation for Abyss X1 and Nginx.
  • Fixed .in files not to hardcode mono location.
  • Provide a friendly response 500 error page if no application could be found for a request.
  • Added directory root detection with code borrowed from XspWorkerRequest.
  • Found bug in Mono.WebServer where MonoWorkerRequest.SendFile was double closing a handle.
  • Removed check for file existence when creating applications. This way proper applications can still be created when the user mistypes the path.
  • Added documentation index page with important information on using paths vs. extensions, what are ASP.NET applications, how applications are handled, and running fastcgi-mono-server on a different machine than the web server. Plus brief information on how a request is actually processed, from Firefox to ASP.Default_aspx:Render(). See
  • Added svn:eol-style=native to .html and .cs files.
  • Added svn:mime-type to HTML and PNG files so they will show up in a web browser.
  • Fixed the status line. It was being sent in the HTTP: “HTTP/1.1 200 OK” format instead of the CGI “Status: 200 OK” format. This was causing some breakage where status 200 was always being sent from web servers and Apache wasn’t working at all.
  • Better output for “/help”
  • Added some docs for using paths instead of directory mapping.
  • Cleaned up UnmanagedSocket with proper SocketExceptions and a wait handle for EndAccept.


After discussion with Daniel Nauck changed the recommended method of handling ASP.NET to sending all requests to fastcgi-mono-server. The benefits are outlined at but in short they are improved security and enhanced features with application specific configuration.


  1. Continue documenting.
  2. Alpha release.
  3. Clean up API.
  4. Adding open source tools: mailing list, bugzilla, wiki page???


Mostly just a million different web server nuances.


  • MSDN: WaitHandle, System.Web.UI.Page, IAsyncResult
  • Netcraft: Server statistics.
  • Apache API reference: Trying to understand cmd_parms.
  • Performance statistics.
  • CGI specification: Review.
  • Information on properties.

Brian Nickel


7 thoughts on “FastCGI ASP.NET Server Status Report 11

  1. Since you seem to already be using Subversion, I’d recommend Trac instead of Bugzilla, since it interfaces natively with SVN. It also has a very nice bug tracking system as well as a wiki and a very decent plugin architecture. It’s also extremely easy to use, both for code-commiting developers and bug reporters.

  2. Alex, I heard of this happening before. I have a couple guesses:
    1) Lighttpd doesn’t have write access to /var/www. To fix this, I would recommend creating /var/www/.wapi and set the owner to lighttpd or up the write
    2) You have previously used mod_mono and it created .wapi with permissions that prevent Lighttpd from writing to it. You should be able to change the owner or permissions as above.

    Let me know what you try and if it works.


  3. Hi Brian.

    I created the .wapi directory with write access for lighttpd user but this time the page never finish to load (nothing is logged on access.log nor error.log).

    I don’t have installed apache nor mod_mono before.

    Thanks for your suggestions — this is just a test but I’ll try to figure out what the problem is (do you have any debugging tips?).


  4. Brian, sorry for the noise — I forgot to set LD_LIBRARY_PATH, fastcgi-mono-server2.exe was throwing an exception because it was not able to find

  5. Hi.

    I tried to install fastcgi-mono-server on openSuse 10.3 beta2 but I can not get it to install.
    I’am new to linux so please forgive me if my question is stupid.

    The problem is that the ” ./ –prefix=/usr && make && sudo make install” command complains about that it can’t find any mono package.

    So whats wrong? When I checked if mono was installed I found that mono 1.2.5 was installed.
    I am sorry to say that I dont understand any of the “PKG_CONFIG_PATH” part, whats that?

    Terminal output:

    checking for MONO… configure: error: Package requirements (mono >= 1.1.9) were not met:

    No package ‘mono’ found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables MONO_CFLAGS
    and MONO_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s