使用Webservice的IgnoreRoute-从路由中排除asmx URL [英] IgnoreRoute with webservice - Exclude asmx URLs from routing
本文介绍了使用Webservice的IgnoreRoute-从路由中排除asmx URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将filevistacontrol添加到我的asp.net MVC Web应用程序中。
Im adding the filevistacontrol to my asp.net MVC web application.
我有一个media.aspx页面,该页面在使用$ p路由时会被忽略
I have a media.aspx page that is ignored in the routing with
routes.IgnoreRoute("media.aspx");
此方法可以成功运行并提供标准的Webforms页面。
This works successfully and serves a standard webforms page.
在添加filevistacontrol之后,我似乎无法忽略该控件对其Web服务的任何调用。
Upon adding the filevistacontrol, I can't seem to ignore any calls the control makes to it's webservice.
例如,下面的ignoreRoute似乎仍然被接收
Eg the following ignoreRoute still seems to get picked up by the MvcHandler.
routes.IgnoreRoute("FileVistaControl/filevista.asmx/GetLanguageFile/");
抛出的异常是:
'The RouteData must contain an item named 'controller' with a non-empty string value'
预先感谢。
推荐答案
我可以使用它(其他答案的组合)来工作:
I got it to work using this (a combo of other answers):
routes.IgnoreRoute("{directory}/{resource}.asmx/{*pathInfo}");
这篇关于使用Webservice的IgnoreRoute-从路由中排除asmx URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文