ASP.NET MVC Deployed Project Not Working: Inheritance System.web.mvc.viewpage Fails?

I have an MVC project that works fine locally. When I deploy to a production server I get a compile error:

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

This leads me to think that inheriting from System.Web.ViewPage (from T) worked somehow ... The project is deployed under http://server/ProjectName

. The website http://server/

works fine when deployed ....

Can anyone please help? Thanks to

UPDATE
Does everyone notice "is not a member of ASP .views_home_index_aspx '.?
Shouldn't it be" not a member of " ProjectName .views_home_index_aspx'.?

0


a source to share


2 answers


You have an 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 inherit the ASP.views_home_index_aspx class from System.Web.Mvc.ViewPage?



EDIT 2: Every page in .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 a compiled class that represents your aspx file in the /home/index.aspx view. It converted "/" and ".". to underline.

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

Is this a big mistake your page is throwing with a stack trace? or you get an error in visual studio. Can you post the code?

+1


a source


Better go through these messages only in case of something that you missed.



0


a source







All Articles