473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Multiple web-apps under one master page site?

Hi

I've just recently upgraded to VS2005 and started using/learning about the
Master Pages.

I'd like to know if it is possible to have separate web app projects use the
master page(s) from their "parent" site.

E.g.:
Main site at http://localhost/mainsite/
sub-app at http://localhost/subsite/

I'm considering using masterpages for our company website overhaul, so these
development locations would eventually map to the real locations of:
main site: http://www.myrealsite.com
sub-app: http://www.myrealsite.com/sub-app-name

(We host our site ourselves)

My reason for asking is motivated by the pre-compiled/site publishing
process of VS2005, which wants to delete any existing target files before
transferring the new versions. For a moderate or larger sized site this
would not be a desirable feature, even if it is quick in operation.

For example, I want to create a separate project/app that looks after a
specific requirement (say a questionairre, or quality feedback forms) that
uses the same master page(s) as the root site.

I guess I'm asking if it's possible to implement similar referential pathing
as I'm used to with stylesheets, etc (e.g. ../styles/global.css)? The
default pathing is app-specific (~/).

I've tried <%@ Page Language="VB" MasterPageFile="../copeohs/copeohs.master"
....
but get the server error of "The virtual path '/copeohs/copeohs.master' maps
to another application, which is not allowed."

Also tried: MasterPageFile="http://localhost/copeohs/copeohs.master"
but this returns "Parser Error Message:
'http://localhost/copeohs/copeohs.master' is not a valid virtual path." (The
path is correct but I assume this is IIS security preventing user-client
delivery of the master file.)

I don't want to use templates, as the idea is to have the masterpages hold
the menu content and thus greatly reduce maintenance requirements. I would
be using a root master for the global menu, plus nested master pages to
provide sub-section menus.

I've done some googling on the subject, but haven't (yet) come across anyone
discussing the particular aspect of separate projects sharing the master file.

Is it even possible - or am I barking up the wrong tree?

Appreciate any pointers to articles, etc, or specific methods.

Thanks.
Aug 1 '06 #1
2 6877
Take a look at this post by Omar Khan:
http://blogs.msdn.com/webdevtools/ar...01/652986.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Alec MacLean" wrote:
Hi

I've just recently upgraded to VS2005 and started using/learning about the
Master Pages.

I'd like to know if it is possible to have separate web app projects use the
master page(s) from their "parent" site.

E.g.:
Main site at http://localhost/mainsite/
sub-app at http://localhost/subsite/

I'm considering using masterpages for our company website overhaul, so these
development locations would eventually map to the real locations of:
main site: http://www.myrealsite.com
sub-app: http://www.myrealsite.com/sub-app-name

(We host our site ourselves)

My reason for asking is motivated by the pre-compiled/site publishing
process of VS2005, which wants to delete any existing target files before
transferring the new versions. For a moderate or larger sized site this
would not be a desirable feature, even if it is quick in operation.

For example, I want to create a separate project/app that looks after a
specific requirement (say a questionairre, or quality feedback forms) that
uses the same master page(s) as the root site.

I guess I'm asking if it's possible to implement similar referential pathing
as I'm used to with stylesheets, etc (e.g. ../styles/global.css)? The
default pathing is app-specific (~/).

I've tried <%@ Page Language="VB" MasterPageFile="../copeohs/copeohs.master"
...
but get the server error of "The virtual path '/copeohs/copeohs.master' maps
to another application, which is not allowed."

Also tried: MasterPageFile="http://localhost/copeohs/copeohs.master"
but this returns "Parser Error Message:
'http://localhost/copeohs/copeohs.master' is not a valid virtual path." (The
path is correct but I assume this is IIS security preventing user-client
delivery of the master file.)

I don't want to use templates, as the idea is to have the masterpages hold
the menu content and thus greatly reduce maintenance requirements. I would
be using a root master for the global menu, plus nested master pages to
provide sub-section menus.

I've done some googling on the subject, but haven't (yet) come across anyone
discussing the particular aspect of separate projects sharing the master file.

Is it even possible - or am I barking up the wrong tree?

Appreciate any pointers to articles, etc, or specific methods.

Thanks.
Aug 1 '06 #2
Thanks Peter - that article has really helped.

Although parts 2 & 3 ar not yet writtne, it's provided enough background for
me to get the sub-site operating with the master pages held in the root
site, which is what I needed.

Thanks again.

Al
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:E0**********************************@microsof t.com...
Take a look at this post by Omar Khan:
http://blogs.msdn.com/webdevtools/ar...01/652986.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Alec MacLean" wrote:
>Hi

I've just recently upgraded to VS2005 and started using/learning about
the
Master Pages.

I'd like to know if it is possible to have separate web app projects use
the
master page(s) from their "parent" site.

E.g.:
Main site at http://localhost/mainsite/
sub-app at http://localhost/subsite/

I'm considering using masterpages for our company website overhaul, so
these
development locations would eventually map to the real locations of:
main site: http://www.myrealsite.com
sub-app: http://www.myrealsite.com/sub-app-name

(We host our site ourselves)

My reason for asking is motivated by the pre-compiled/site publishing
process of VS2005, which wants to delete any existing target files before
transferring the new versions. For a moderate or larger sized site this
would not be a desirable feature, even if it is quick in operation.

For example, I want to create a separate project/app that looks after a
specific requirement (say a questionairre, or quality feedback forms)
that
uses the same master page(s) as the root site.

I guess I'm asking if it's possible to implement similar referential
pathing
as I'm used to with stylesheets, etc (e.g. ../styles/global.css)? The
default pathing is app-specific (~/).

I've tried <%@ Page Language="VB"
MasterPageFile="../copeohs/copeohs.master"
...
but get the server error of "The virtual path '/copeohs/copeohs.master'
maps
to another application, which is not allowed."

Also tried: MasterPageFile="http://localhost/copeohs/copeohs.master"
but this returns "Parser Error Message:
'http://localhost/copeohs/copeohs.master' is not a valid virtual path."
(The
path is correct but I assume this is IIS security preventing user-client
delivery of the master file.)

I don't want to use templates, as the idea is to have the masterpages
hold
the menu content and thus greatly reduce maintenance requirements. I
would
be using a root master for the global menu, plus nested master pages to
provide sub-section menus.

I've done some googling on the subject, but haven't (yet) come across
anyone
discussing the particular aspect of separate projects sharing the master
file.

Is it even possible - or am I barking up the wrong tree?

Appreciate any pointers to articles, etc, or specific methods.

Thanks.

Aug 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bill yeager | last post by:
Duray, it helps in regards to knowing how to get the items that were selected in the lisbox, but I'm going in reverse --- after I get the items from the db that were selected, I'd like to be able...
1
by: Luther Miller | last post by:
I've created a web setup project that works great for installing an ASP.NET application to a virtual directory on a server. I'd like to be able to use the same setup program to install multiple...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
4
by: tshad | last post by:
Can I set up multiple pages in the same Location tag? I thought I saw somewhere that I could. I tried the following, but it doesn't work. ***************************************************...
2
by: Tumurbaatar S. | last post by:
ASP.NET QuickStart Tutorial says that: .... ASP.NET maintains a pool of HttpApplication instances over the course of a Web application's lifetime. ASP.NET automatically assigns one of these...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
0
by: Tiro | last post by:
Hi, I am trying to understand how does .Net Web Service handle requests for multiple clients simultaneously. Here is what I am trying to achieve. I have created a web serive that search...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
0
by: rbg | last post by:
Have a web application which uses Data Cache. I need to understand what happens when a new instance of the same web application is created for for serving concurrent clients. What happens when...
2
by: info.lowyeah | last post by:
Dear all, Can anybody tell me how to setup multiple web.config in 1 web application? many thanks Alan
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.