Using a common Master page across various applications hosted in IIS
-
Hi, I have created an Master Page that resides within my root folder. I wanted to resuse this Master Page across various applications hosted in IIS. But in doing so I get the below [1] error. I googled and found following link http://weblogs.asp.net/dwahlin/archive/2005/11/16/430779.aspx To be more specific here is what I wanted to achieve I have a master page @ following location C:\Inetpub\wwwroot\Common\TemplateMaster.master I wanted to use this master page across various applications i.e. I wanted this master page to be used by various .aspx pages of my below applications C:\Inetpub\wwwroot\SampleApp1\Page1.aspx C:\Inetpub\wwwroot\SampleApp2\Page1.aspx Following is the code for Master Page implementation within the C:\Inetpub\wwwroot\SampleApp1\Page1.aspx web page
<%@ Page Language="C#" MasterPageFile="/intranet/Common/TemplateMaster.master" CodeFile="Page1.aspx.cs" Inherits="Page1" Title="Page 1" %>
Now after the above implementation, when I try to build my SampleApp1 website, I encounter below [1] error Is it possible to achieve this? If yes, then is there is any better way to achieve the above functionalities other than that shown in the above link? **[1]**The virtual path '/intranet/Common/TemplateMaster.master' maps to another application, which is not allowed.
Regards, Vipul Mehta
modified on Wednesday, May 27, 2009 11:03 PM
-
Hi, I have created an Master Page that resides within my root folder. I wanted to resuse this Master Page across various applications hosted in IIS. But in doing so I get the below [1] error. I googled and found following link http://weblogs.asp.net/dwahlin/archive/2005/11/16/430779.aspx To be more specific here is what I wanted to achieve I have a master page @ following location C:\Inetpub\wwwroot\Common\TemplateMaster.master I wanted to use this master page across various applications i.e. I wanted this master page to be used by various .aspx pages of my below applications C:\Inetpub\wwwroot\SampleApp1\Page1.aspx C:\Inetpub\wwwroot\SampleApp2\Page1.aspx Following is the code for Master Page implementation within the C:\Inetpub\wwwroot\SampleApp1\Page1.aspx web page
<%@ Page Language="C#" MasterPageFile="/intranet/Common/TemplateMaster.master" CodeFile="Page1.aspx.cs" Inherits="Page1" Title="Page 1" %>
Now after the above implementation, when I try to build my SampleApp1 website, I encounter below [1] error Is it possible to achieve this? If yes, then is there is any better way to achieve the above functionalities other than that shown in the above link? **[1]**The virtual path '/intranet/Common/TemplateMaster.master' maps to another application, which is not allowed.
Regards, Vipul Mehta
modified on Wednesday, May 27, 2009 11:03 PM