ASP.NET MVC 2 RC 2 returns Area-specific controller when no area specified

Posted by Bryan on Stack Overflow See other posts from Stack Overflow or by Bryan
Published on 2010-02-22T21:53:26Z Indexed on 2010/05/06 23:08 UTC
Read the original article Hit count: 353

Filed under:
|
|

I have a basic MVC 2 (RC2) site with one base-level controller ("Home"), and one area ("Admin") with one controller ("Abstract"). When i call http://website/Abstract - the Abstract controller in the Admin area gets called even though i haven't specified the Area in the URL. To make matters worse - it doesn't seem to know it's under Admin because it can't find the associated view and just returns:

The view 'Index' or its master was not found. The following locations were searched:
~/Views/Abstract/Index.aspx
~/Views/Abstract/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx

Am i doing something wrong? Is this a bug? A feature?

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about areas