开发者

ASP.NET MVC 2 - How to ignore an entire directory using IgnoreRoute?

I've tried the following two methods to try and ignore my "Assets" folder, but I keep coming up with errors. Can anyone tell me exactly how the Ignore Regex is supposed 开发者_Go百科to look?

    routes.IgnoreRoute("/Assets/")
    routes.IgnoreRoute("{*assets}", New With {.assets = "\/Assets\/(.*)"})


Try

routes.RouteExistingFiles = false
routes.IgnoreRoute("Assets/{*pathInfo}")


routes.IgnoreRoute("Ignore/");

will prevent the standard

The controller for path '/Crap/Home' was not found or does not implement IController. Asp.net mvc exception.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜