asp.net-mvcinheritanceviewpage

ASP.NET MVC Deployed project not working: Inheritance System.web.mvc.viewpage fails?


i have a MVC project which runs perfectly local. When I deploy to the production server I receive a compilation error:

BC30456: 'Title' is not a member of 'ASP.views_home_index_aspx'.

It makes me think that the inheritance of System.Web.ViewPage(of T) fails somehow... The project is deployed under http://server/ProjectName. The website at http://server/ works fine when deployed....

Can somebody assist? Thanks

UPDATE
Does everybody notice: "not a member of 'ASP.views_home_index_aspx'. ?
Shouldn't this be "not a member of 'ProjectName.views_home_index_aspx'. ?


Solution

  • Have you got the MVC DLL in your projects BIN folder.

    It is installed on your machine at C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 1.0\Assemblies

    EDIT: Does the class ASP.views_home_index_aspx inherit from System.Web.Mvc.ViewPage ?

    EDIT 2: Every page in a .net web application and/or MVC site is compiled into a class. The class names are generated from the location of the file. So views_home_index_aspx is the compiled class that represents your aspx file at views/home/index.aspx . It has converted the "/" and "." to underscores.

    So your error is saying that, the compiled class that your page generates does not contain the Title member you are trying to access.

    Is this a big error that your page throws with a stack trace? or do you get the error in visual studio. Can you post some code?