Sunday, August 30, 2009

Azure WebRole and Custom Error Handlers

A useful article on how to use custom handlers in the cloud:

The main idea is that Azure is runnin on IIS7, so you have the power to plug-in into the integrated pipline mode.

In short:

< errormode="Custom">
< statuscode="404">
< statuscode="404" responsemode="ExecuteURL" path="/page-not-found.aspx">
< /httpErrors >
< /system.webServer >

Put the configuration in system.webServer, insted of in system.web.

I would also add a handler for 400 status code. This is if you are making some custom http handlers.

No comments: