I need to create a virtual directory alias which redirects user to a given web page. If there is no VD for that page, then master page ref works well.As soon as I created VD and try to get that same page by entering the path to VD, I got the error message

Server Error in '/subdirectory' 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 '/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: 1

The issue here is the path reference you have for the Master page. Try removing the ~

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.