Link to home
Start Free TrialLog in
Avatar of ThePATMAN26
ThePATMAN26Flag for United States of America

asked on

Parser Error Message: The file '/theMaster.Master' does not exist.

Working with master pages for the first time. I keep receiving a parser error when I try to load a page that utilizes my master page called theMaster.Master. I thought it was something I mucked up somewhere else in my code so I started again from scratch, left all the automatically generated code alone and I'm still receiving the error.

Below is the entire error I'm receiving. What's the solution?

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The file '/theMaster.Master' does not exist.

Source Error:


Line 1:  <%@ Page Title="" Language="C#" MasterPageFile="~/theMaster.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Logan.Default" %>
Line 2:  <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
Line 3:  </asp:Content>

Source File: /logan_photo/default.aspx    Line: 1
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

What does your master page directive look like? It should look like this:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="theMaster.master.cs" Inherits="Logan.theMaster" %>
Avatar of ThePATMAN26

ASKER

tommyBoy - that's exactly what I have.
Try replacing the tilde (~/theMaster.Master) with a period (./theMaster.Master).
Check that all code behind names match the names in the Page directives exactly.
Is this happening inside your development environment or after deployment or both?
tried changing the ~ to . - no change. It does work in Visual Studio. I started a new project, kept it very simple and it again works in the development environment but won't work live. I've attached the Master file and default web form using the master page.
Default.aspx
Test.Master
I copied and pasted your markup to a new master page project in VS 2005. It worked in VS and it worked when I deployed it to a web server.

Could there be a mismatch of the IIS version or .NET framework version between your development environment and the web server?
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial