I'm developing a small server that is supposed to interface via http. As I want it to be usable with different mature http servers, I have chosen FastCGI as the common interface.
Now I can't find a (free) .NET library that implements the FCGI interface and does all the hard work for me. Do you know one?
See Mono.WebServer.FastCGI at
https://github.com/mono/xsp/tree/master/src
There's also a FastCGI CLIENT here:
http://sourceforge.net/projects/fcgidotnet/
And the FastCGI specification is here:
http://www.fastcgi.com/devkit/doc/fcgi-spec.html
You can find a OWIN compliant implementation here:
https://github.com/mzabani/Fos
Additionally, these libraries are also interesting:
HyperFastCGI:
https://github.com/xplicit/HyperFastCgi
or
https://github.com/gigi81/sharpfastcgi
or #cgi
https://github.com/wmeyer/SharpCGI
If you need more examples on FastCGI CLIENTs, you can have a look at this go library
https://github.com/tomasen/fcgi_client
Not that I am aware of (I'm also looking)
One of the difficulties lies in the fact that FastCGI seems to require that you pass a handle to a listener socket to a child process in place of the normal StdIn handle - something which the standard .Net classes (Process, Socket etc...) don't allow. This means implementing a FastCGI library in .Net ultimately requires re-implementing the Process and Socket classes using P/Invoke calls to native Windows functions.
I recently implemented such a library in F#: SharpCGI
Also completely usable from C#.
The problem Kragen describes is solved with some Win32 hackery, exploiting .NET internals. However, you don't have to use that if you configure your web server to use a designated port for FastCGI instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With