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

You can ignore robots.txt and all the aspx pages in your routing.

routes.IgnoreRoute("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"});
routes.IgnoreRoute("{*robotstxt}", new {robotstxt=@"(.*/)?robots.txt(/.*)?"});

You might want to ignore the favicon too.

routes.IgnoreRoute("{*favicon}", new {favicon=@"(.*/)?favicon.ico(/.*)?"});

You can adjust the regular expression to exclude paths.

Haacked from the source.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)