Alex Rivera | Logout

IgnoreRoute with webservice - Exclude asmx URLs from routing

Asked 2011-01-12T23:48:55.193
11

Im adding the filevistacontrol to my asp.net MVC web application.

I have a media.aspx page that is ignored in the routing with

routes.IgnoreRoute("media.aspx");

This works successfully and serves a standard webforms page.

Upon adding the filevistacontrol, I can't seem to ignore any calls the control makes to it's webservice.

Eg the following ignoreRoute still seems to get picked up by the MvcHandler.

routes.IgnoreRoute("FileVistaControl/filevista.asmx/GetLanguageFile/");

The exception thrown is:

'The RouteData must contain an item named 'controller' with a non-empty string value'

Thanks in advance.

Edit
Report

1 Answer

9

I got it to work using this (a combo of other answers):

routes.IgnoreRoute("{directory}/{resource}.asmx/{*pathInfo}");
answered 2011-05-03T17:08:35.423

Your Answer