views:

498

answers:

2

I have created a Web Application in asp.net 2.0. which is working fine on my Local machine. However when trying to deploy it on sever that has windows 2003 sever, I get the error:

Server Error in '/' Application.


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 '/MasterPage.master' does not exist.

Source Error:

Line 1:  <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="LinkChecker Home " %>
Line 2:  <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
Line 3:

Source File: /LinkChecker/Default.aspx Line: 1

Any idea how this can be fixed?

+11  A: 

Is the folder on the web server (IIS presumably) marked as an ASP.NET application? If not, ~/ will point to the next application up, or the site root.

It should have a cog icon in the IIS/MMC snap-in. Also ensure that it is running the right version of ASP.NET (v2.blah usually).

In the IIS/MMC view, find the folder that is your project; right-click; Properties. Check it has an Application Name; if it doesn't, click Create. You might also want to tweak the app-pool if you want it to run in a different identity than default. Also check the ASP.NET tab - for example, it might be 2.0.50727.

Marc Gravell
that is probably exactly what it is.
mattlant
I second this - you need to be running at least .Net 2.0 for master pages to work. Check what app pool you are using - if you have a mix of .net 1.1 and 2.0 apps, you cannot mix framework versions in the one pool.
Ken Ray
A: 

There are other possible issues that could result in the error message stated above, like permission problems on the server for instance.

Look here for a thread in which this topic is also discussed.

Mephisztoe