Jump to content

ASP.NET Master Page Problem with Virtual Directory Alias


kwilliams

Recommended Posts

To make it easier for users to get to a section of our site, we created a virtual directory alias which redirects the user to a specific web page. If there's no virtual directory for http://www.mysite.com/subdirectory/webpage.aspx, then that Master Page reference works fine. But once I created a virtual directory and attempted to get to that same page by typing the path to the virtual directory (http://www.mysite.com/subdirectory), I received this error message relating to the web page trying to access our site's Master Page, which is located in the root of the site:Server Error in '/subdirectory' Application.Parser ErrorDescription: 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 '/subdirectory/MasterPage.master' does not exist.Source Error:Line 1: <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" EnableSessionState="true" EnableViewState="false" Title="Web Page" %>Source File: /subdirectory/webpage.aspx Line: 1I've tried changing the "~/MasterPage.master" reference to "./MasterPage.master" (one period), "../MasterPage.master" (two periods), "/MasterPage.master" (no tilde before slash), and "MasterPage.master" (just the file name) to no avail! Does anyone here know how I can fix this?These are two sites that contain steps on what we did:http://www.microsoft.com/technet/prodtechn...2.mspx?mfr=true (under "Virtual Directories")http://www.beansoftware.com/ASP.NET-Tutori...IS-ASP.NET.aspx (under "How to create the virtual directory on the web server")

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...