Personal Blog of Mustafa Basgun

Posts Tagged ‘asp.net

Getting Syntax Error in ASP.NET Routing Due to WebResource.axd

with 6 comments

If you implement routing in an ASP.NET 4.0 web application and use the validation controls in it, it is good to keep in mind that you need to add an exception for the .axd files in your Global.asax file. Otherwise, you will keep getting a syntax error because the routing picks up the .axd files and not properly loads the JavaScript files needed for the validation controls.

mustafa-basgun-blog-aspnet-routing-error-1

mustafa-basgun-blog-aspnet-routing-error-2

If same issue occurs in an ASP.NET 3.5 SP1 application, you can use the StopRoutingHandler class which implements the IRouteHandler interface.

Written by Mustafa Basgun

October 25, 2010 at 9:51 PM

Posted in AJAX, ASP.NET, C#, Web Development

Tagged with ,