views:

462

answers:

2

Hi,

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

+1  A: 

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?

Greg B
Yes it's there. I'm using a websetup deployment project and the assembly is found as dependency so it's automatically included. :(
Ropstah
You're getting close I think. I have /views/home/index.aspx. This page has an inherits attribute which says: "System.Web.Mvc.ViewPage(Of IEnumerable(Of Models.Project))". However I cannot find the class views_home_index_aspx anywhere....
Ropstah
A: 

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

cottsak
Thanks for the urls, but both sites don't mention anything related to this issue...
Ropstah