Sunday, November 21, 2010

Write custom ASP.NET HTTP Handler with IronPython

An HTTP handler is the endpoint that responds to handle request made by an ASP.NET Web application. The request is mapped to HTTP handler based on name pattern (commonly file extension). ASP.NET provides a few default HTTP handlers: Page handler (.aspx), Web Service handler (.asmx), Generic handler (.ashx) and so forth.

ASHX Generic handler is special since it allows to implement IHttpHandler API immediately.
There is a sample - HelloWorld.ashx:

Language attribute allows me to chose program language to use, but it strongly limited by only two - C# and VB. What if I want to write my code in Python?

Friday, November 19, 2010

Write ASP.NET MVC using IronPython - Resources

I started research of using IronPython on ASP.NET MVC.

There are resources I found helpful:

Official Site: (download links are not up to date)

ASP.NET Dynamic Language Support:
IronPython integration with ASP.NET, No support for ASP.NET MVC (at least for now, seems they did support ASP.NET MVC in the past)

The New Dynamic Language Extensibility Model for ASP.NET:

Write ASP.NET MVC application in Ruby: (not Python, but similar to my target)

Using IronPython in ASP.NET MVC:
A Simple IronPython ControllerFactory for ASP.NET MVC
A Simple IronPython ActionFilter for ASP.NET MVC
A Simple IronPython Route Mapper for ASP.NET MVC
An Unobtrusive IronPython ViewEngine for ASP.NET MVC

The last links seem to be worthiest

The next step is starting simple ASP.NET MVC application with IronPython.