ASP.Net MVC 2 Areas: The partial view '...' was not found -


we upgraded project mvc 2 , we'd use areas there issue.

we have created new area, setup controller, configured route, , created view in correct location. when run code finds route , hits controller when goes render view there exception.

the web forms view engine doesn't seem looking in areas section views. error we're seeing is:

~/views/<controllername>/<viewname>.aspx ~/views/<controllername>/<viewname>.ascx ~/views/shared/<viewname>.aspx ~/views/shared/<viewname>.ascx 

when should be:

~/<areaname>/views/<controllername>/<viewname>.aspx ~/<areaname>/views/<controllername>/<viewname>.ascx ~/<areaname>/views/shared/<viewname>.aspx ~/<areaname>/views/shared/<viewname>.ascx ~/views/<controllername>/<viewname>.aspx ~/views/<controllername>/<viewname>.ascx ~/views/shared/<viewname>.aspx ~/views/shared/<viewname>.ascx 

this indicate it's still somehow using mvc 1 dll we've looked carefully , can find references v2 of mvc (there v1 reference in xval, third party dll, fixing didn't make difference).

i can imagine missed when did upgrade or we've got unusual edge case because there doesn't seem on web matches problem we're experiencing.

what things @ might resolve issue?

thanks in advance provided. cheers, zac

what things @ might resolve issue?

  1. make sure area routes registered arearegistration.registerallareas(); registered first. area routes need registered well.
  2. make sure generated url links have the area name included 1 of arguments when using actionlink , other related url helpers
  3. sometimes delete , re-add area scratch. sounds silly, works.
  4. the related question on left hand side of page may help. have linked 1 think may of value

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -