Jump to content
kwilliams

ASP.NET Master Page Problem with Virtual Directory Alias

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")

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...