Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Using a common Master page across various applications hosted in IIS

Using a common Master page across various applications hosted in IIS

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netwindows-adminhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vipul Mehta
    wrote on last edited by
    #1

    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

    B 1 Reply Last reply
    0
    • V Vipul Mehta

      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

      B Offline
      B Offline
      Baran M
      wrote on last edited by
      #2

      Did you try this ?[^]

      B 1 Reply Last reply
      0
      • B Baran M

        Did you try this ?[^]

        B Offline
        B Offline
        Baran M
        wrote on last edited by
        #3

        I could find many alternates are available to share a master page across various applications like, Using Version control system, Share it in a DLL... Google it you will get more. :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups