An alternate fix for 'WebForm_PostBackOptions' is undefined

“'WebForm_PostBackOptions' is undefined” is one of those errors which can have a variety of causes. Here’s another one to add to that list – it’s pretty obvious, but easy to overlook if you’re in a rush.

Firstly, check your httpModules, as custom modules can often cause this issue. However in my case I didn’t have any custom modules, in fact I’d just removed a couple – ripping out Intelligica’s ReWriter to replace it with the stock functionality provided by System.Web.Routing.. which of course was where the problem lies.

I’d forgotten to add the StopRoutingHandler for all *.axd calls. Duh. The fix is easy – simply add the StopRoutingHandler to your global.axd. Here’s the line I’m using:

RouteTable.Routes.Add(new Route("{resource}.axd/{*pathInfo}", new StopRoutingHandler()));

(Just noticed I’ve not reinstalled my code syntax highlighter since my last rebuild! No shiny colours, sorry all!)

Posted on Thursday, November 12, 2009 2:05 PM |

Like this? Share it!

No comments posted yet.

Post a comment
Please add 5 and 5 and type the answer here:
Remember me?
Ensure the word in this box says 'orange':