IgnoreRoute with webservice - 从路由中排除 asmx URL [英] IgnoreRoute with webservice - Exclude asmx URLs from routing
本文介绍了IgnoreRoute with webservice - 从路由中排除 asmx URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将 filevistacontrol 添加到我的 asp.net MVC Web 应用程序中.
Im adding the filevistacontrol to my asp.net MVC web application.
我有一个在路由中被忽略的 media.aspx 页面
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.
添加 filevistacontrol 后,我似乎无法忽略该控件对其网络服务的任何调用.
Upon adding the filevistacontrol, I can't seem to ignore any calls the control makes to it's webservice.
例如,下面的 ignoreRoute 似乎仍然被 MvcHandler 接收.
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}");
这篇关于IgnoreRoute with webservice - 从路由中排除 asmx URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文