473,396 Members | 2,024 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,396 software developers and data experts.

MasterPageFile problem - accessing another website

Hi All,

I wanted to set up my websites like this

c:\websites\intranettemplate
c:\websites\app1
c:\websites\app2

Basically I wanted to have the master pages defined in the template
folder and all other apps would "reference" this folder to get the
appropriate master file that they need to include in their page.

Problem is this...I tried using
MasterPageFile="../app1/MasterPage1.master"
and i get an error saying that i am trying to access a master file in
another directory and this is not allowed.

Is this a security problem in IIS/Web Server that comes with VS.NET
2005 Web Developer Edition Beta or is it a restriction of the framework
i.e. must the master be in your website?

Any help would be greatly appreciated.

Thank you.

Reeza.

Nov 19 '05 #1
4 1597
Just like pages, master files must reside in the application directory somewhere.
I saw someone else post somewhere about a hack you could do to centralize
the location of files across multiple applications, but I can't recall where
I saw it.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi All,

I wanted to set up my websites like this

c:\websites\intranettemplate
c:\websites\app1
c:\websites\app2
Basically I wanted to have the master pages defined in the template
folder and all other apps would "reference" this folder to get the
appropriate master file that they need to include in their page.

Problem is this...I tried using
MasterPageFile="../app1/MasterPage1.master"
and i get an error saying that i am trying to access a master file in
another directory and this is not allowed.
Is this a security problem in IIS/Web Server that comes with VS.NET
2005 Web Developer Edition Beta or is it a restriction of the
framework i.e. must the master be in your website?

Any help would be greatly appreciated.

Thank you.

Reeza.


Nov 19 '05 #2
I saw that post somewhere too and can't find it.

I believe it was the same trick used to share user controls, that is
create a virtual directory (non-application vdir) as a subfolder and
point it to a physical directory of master pages.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 02 May 2005 08:39:58 -0700, Brock Allen
<ba****@NOSPAMdevelop.com> wrote:
Just like pages, master files must reside in the application directory somewhere.
I saw someone else post somewhere about a hack you could do to centralize
the location of files across multiple applications, but I can't recall where
I saw it.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi All,

I wanted to set up my websites like this

c:\websites\intranettemplate
c:\websites\app1
c:\websites\app2
Basically I wanted to have the master pages defined in the template
folder and all other apps would "reference" this folder to get the
appropriate master file that they need to include in their page.

Problem is this...I tried using
MasterPageFile="../app1/MasterPage1.master"
and i get an error saying that i am trying to access a master file in
another directory and this is not allowed.
Is this a security problem in IIS/Web Server that comes with VS.NET
2005 Web Developer Edition Beta or is it a restriction of the
framework i.e. must the master be in your website?

Any help would be greatly appreciated.

Thank you.

Reeza.



Nov 19 '05 #3
I think this is it....but i cannot find the dll for the website

http://www.codeproject.com/aspnet/ctrlreuse.asp

Nov 19 '05 #4
Also:

http://blogs.msdn.com/adamga/archive...12/407631.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 3 May 2005 08:03:45 -0700, "reez" <re******@gmail.com> wrote:
I think this is it....but i cannot find the dll for the website

http://www.codeproject.com/aspnet/ctrlreuse.asp


Nov 19 '05 #5

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

Similar topics

2
by: Generic Usenet Account | last post by:
I am trying to create a Java application that reads a list of URLs from a file and stores their contents on the local file system. I have succeeded in accessing normal websites, but I am unable to...
36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
9
by: Justin Engelman | last post by:
Hi, I have a website that uses an ISAPI filter that will redirect anyone going to any page on the site to an SSL login page (on a different website with the same root domain) if they do not have...
1
by: Alexander Widera | last post by:
Is the a possibility to write the masterpages for different browsers into the web.config, so that i havn't to write in every single page e.g. ie:MasterPageFile=".." mozilla:MasterPageFile="..."...
0
by: Brian Orrell | last post by:
I have set the masterPageFile property in my web.config as follows: <pages masterPageFile="~/Main.master" > When I create a webform and I don't specify a masterPageFile in the aspx (so that it...
1
by: meade | last post by:
Hi there, I was wondering if it's possible to display today's date on a website without accessing the visitor's computer? Internet Explorer gives me a warning that the site is trying to access my...
1
by: Alan Silver | last post by:
Hello, I have a site that uses master pages. To enable simple switching of the master page, and to avoid potential inconsistencies between pages, I set the master page file in the web.config...
3
by: Greg Collins [Microsoft MVP] | last post by:
I'm looking to discover in what event I can programmatically set this.MasterPageFile for a master page. Documentation states that this property must be set in the PreInit or before, but master...
3
by: Nathan Sokalski | last post by:
When I attempt to access a Microsoft Access database from my website, I recieve the following error: Server Error in '/' Application....
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.