From 0c91df3ae06bf8f438558362091b18cba6519802 Mon Sep 17 00:00:00 2001 From: Daniel J Sell Date: Thu, 11 Nov 2010 17:57:49 -0800 Subject: [PATCH] making MasterPageFile handle relative paths MasterPageFile should be relative to the file being parsed, not the request path --- mcs/class/System.Web/System.Web.UI/PageParser.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs index 6f92e3c2815b..82769d3b2b91 100644 --- a/mcs/class/System.Web/System.Web.UI/PageParser.cs +++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs @@ -404,6 +404,7 @@ internal override void ProcessMainAttributes (IDictionary atts) value = GetString (atts, "MasterPageFile", masterPage != null ? masterPage.Value : null); if (!String.IsNullOrEmpty (value)) { if (!BaseParser.IsExpression (value)) { + value = System.Web.VirtualPathUtility.Combine(BaseVirtualDir, value); if (!HostingEnvironment.VirtualPathProvider.FileExists (value)) ThrowParseFileNotFound (value); AddDependency (value);