Ropstah
Ropstah

Reputation: 17794

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'. ?

Upvotes: 0

Views: 760

Answers (2)

Greg B
Greg B

Reputation: 14888

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?

Upvotes: 1

Matt Kocaj
Matt Kocaj

Reputation: 11535

Best go through these posts just in case its something you have missed.

Upvotes: 0

Related Questions