I'm getting a “Does not implement IController” error on images and robots.txt in MVC2

后端 未结 6 2214
滥情空心
滥情空心 2020-12-04 09:12

I\'m getting a strange error on my webserver for seemingly every file but the .aspx files.

Here is an example. Just replace \'/robots.txt\' with any .jpg name or .gi

6条回答
  •  [愿得一人]
    2020-12-04 09:32

    This error could also happen if inside a view in your area, you use the Html.Action helper. This helper will always use the area as a prepend, unless you specifically tell it not to. E.g.,

    @Html.Action("Main", "Navigation", new { area = string.Empty })
    

提交回复
热议问题