gpt4 book ai didi

asp.net - IgnoreRoute with webservice - 从路由中排除 asmx URL

转载 作者:行者123 更新时间:2023-12-04 01:35:40 28 4
gpt4 key购买 nike

我将 filevistacontrol 添加到我的 asp.net MVC web 应用程序中。

我有一个在路由中被忽略的 media.aspx 页面

routes.IgnoreRoute("media.aspx");

这工作成功并提供标准的 webforms 页面。

添加 filevistacontrol 后,我似乎无法忽略该控件对其 web 服务的任何调用。

例如,下面的 ignoreRoute 似乎仍然被 MvcHandler 接收。
routes.IgnoreRoute("FileVistaControl/filevista.asmx/GetLanguageFile/");

抛出的异常是:
'The RouteData must contain an item named 'controller' with a non-empty string value'

提前致谢。

最佳答案

我使用这个(其他答案的组合)让它工作:

routes.IgnoreRoute("{directory}/{resource}.asmx/{*pathInfo}");

关于asp.net - IgnoreRoute with webservice - 从路由中排除 asmx URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4675367/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com