I have this directory structure:
[website]
[folder]
Default.aspx
Default.aspx
Web.config
The Page Directive in the file in [folder]
was created by Visual Studio 2010 when I added a new Web Form using Master Page:
<%@ Page Title="" Language="C#" MasterPageFile="~/Page.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="website.folder.Default" %>
When I run this application in the debugger (using localhost), it works fine.
When I push it up to the server (Windows Server 2003 R2), that same page produces a Parser Error on the Page Directive line:
Parser Error
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 '/website/folder/Page.Master' does not exist.
Source Error:
Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/Page.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="website.folder.Default" %>
Line 2:Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1008
/folder
as the root folder. – MikeSmithDevdefault.aspx
or was the site just configured incorrectly in IIS? (going tothesite.com/default.aspx
is the page infolder
) – MikeSmithDev