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

后端 未结 6 2237
滥情空心
滥情空心 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:43

    Do you still have:

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

    ... in your Global.asax.cs?

    MVC puts it there by default, and it's supposed to handle this.

    If you do, then the problem may be how you're mixing MVC and WebForms.

提交回复
热议问题