Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.net MasterPage.master does not exist

I am having a problem while publishing my website on the IIS server, i don't have direct access to it so i have to rely on some one else to configure my website on the IIS. however when i upload my website this error comes up:

Line 1:

  <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Untitled Page" %>

Line 2:

  <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

Parser Error Message: The file '/server/website/MasterPage.master' does not exist.

my masterpage is in the root folder of the website and default.aspx is on the root also, i have searched on internet for answer but the best i have found is changing MasterPageFile="~/MasterPage.master" to MasterPageFile="./MasterPage.master" but haven't tried yet till Monday.

i would appreciate your help.

like image 704
Fernando Avatar asked Jul 22 '26 20:07

Fernando


1 Answers

(i)Make sure that the user account that the server is running under has permissions to access that directory.

(ii)When using "~" in a file path, make sure that the current application deployment believes the root directory is the same as it was before.

(iii)Open IIS, right-click on the virtual directory folder for this site, and selected "Convert to Application." Refresh and check again.

like image 181
Sajeetharan Avatar answered Jul 25 '26 14:07

Sajeetharan