Sunday, January 22, 2012

ASP.net Routing vs ScriptManager

Recently I had a problem with ScriptManager on a WebForms site where I was also using the ScriptManager.

Suddenly my ASP.net validators stopped working client-side and on Firebug I could read this error:

ASP.NET Ajax client-side framework failed to load.

Crap... what am I doing wrong here!?

It seems that Rounting messes with the .axd files script manager generates so we only need to tell the routing to ignore those:
routes.Ignore("{resource}.axd/{*pathInfo}");

Done!!