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?
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.