views:

143

answers:

2

In moving my MVC app from dev to prod, I get a parse error on the server. The only message I get is the following:

Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage<TYPE of View Model>'.
        Line 1:  <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TYPE of View Model>" %>
        Line 2:  
        Line 3:  <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    Source File:  /Views/Workout/Index.aspx    Line:  1

I know this isn't very descriptive by any means, but it's all I have. I have successfully deployed to this server before -- and as the great saying goes "it works on my machine"

A very odd thing is: For pages that require a login, it manages to pull the login page. Once you try to login or go to a page other than the login page, is when it throws the parse error.

A: 

Is it possible that the version of sytem.web.mvc on your local machine and the deployment target are different?

Matt Wrock
I've deployed a previous version of my app with the same MVC version, so I'm leaning towards saying 'no' to a different version issue
MunkiPhD
A: 

I found the solution here. Turns out that somewhere in there I was missing a piece of information from my web.config under the pages directive.

It was a version issue such that I started the project with a beta version of MVC and have since upgraded to MVC RC 1.0 (it was NOT a MVC version issue from development machine to production server).

MunkiPhD