473,385 Members | 1,766 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.

Visual Studio 2008 - Master Page Error

I have an intranet site and want to create a simple master page to be shared
across all applications that are built for that site. I build my master page
in c:\inetpub\wwwroot\Masters as CTMNet.master and I have tested it with no
problems.

I am now trying to use VS2008 to build my first application which would
reference the master page. I created a virtual directory that points to
c:\inetpub\wwwroot\masters, and my page starts with:

<%@ Page Title="" Language="VB" MasterPageFile="~/Masters/CTMNet.master"
AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ MasterType VirtualPath="~/Masters/CTMNet.master" %>

When I run the page, it works fine, but in VS2008 Designer mode, I get the
error "Master Page error - The Master page file
'http://localhost/SiteInfo/Masters/CTMNet.naster' cannot be loaded. Correct
the problem in code view." The designer is disabled. There are two errors
that show up in the error window. They are the same, but repeated once for
each of the lines shown above. The error is 'The file
'/SiteInfo/Masters/CTMNet.master' does not exist.'

How do I correct this???

Thank you!!!
--
Steve LaForge
Sodexo Clinical Technology Management
Sep 8 '08 #1
3 5885
"Steve LaForge" <St**********@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
>I have an intranet site and want to create a simple master page to be
shared
across all applications that are built for that site. I build my master
page
in c:\inetpub\wwwroot\Masters as CTMNet.master and I have tested it with
no
problems.

I am now trying to use VS2008 to build my first application which would
reference the master page. I created a virtual directory that points to
c:\inetpub\wwwroot\masters, and my page starts with:

<%@ Page Title="" Language="VB" MasterPageFile="~/Masters/CTMNet.master"
AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ MasterType VirtualPath="~/Masters/CTMNet.master" %>

When I run the page, it works fine, but in VS2008 Designer mode, I get the
error "Master Page error - The Master page file
'http://localhost/SiteInfo/Masters/CTMNet.naster' cannot be loaded.
Correct
the problem in code view." The designer is disabled. There are two
errors
that show up in the error window. They are the same, but repeated once
for
each of the lines shown above. The error is 'The file
'/SiteInfo/Masters/CTMNet.master' does not exist.'

How do I correct this???

Thank you!!!
c:\inetpub\wwwroot\masters is your root now on a virtual directory. What did
you try?

I'm assuming MasterPageFile="CTMNet.master" would work

Jeff
Sep 8 '08 #2

--
Steve LaForge
Sodexo Clinical Technology Management
"Jeff Dillon" wrote:
"Steve LaForge" <St**********@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
I have an intranet site and want to create a simple master page to be
shared
across all applications that are built for that site. I build my master
page
in c:\inetpub\wwwroot\Masters as CTMNet.master and I have tested it with
no
problems.

I am now trying to use VS2008 to build my first application which would
reference the master page. I created a virtual directory that points to
c:\inetpub\wwwroot\masters, and my page starts with:

<%@ Page Title="" Language="VB" MasterPageFile="~/Masters/CTMNet.master"
AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ MasterType VirtualPath="~/Masters/CTMNet.master" %>

When I run the page, it works fine, but in VS2008 Designer mode, I get the
error "Master Page error - The Master page file
'http://localhost/SiteInfo/Masters/CTMNet.naster' cannot be loaded.
Correct
the problem in code view." The designer is disabled. There are two
errors
that show up in the error window. They are the same, but repeated once
for
each of the lines shown above. The error is 'The file
'/SiteInfo/Masters/CTMNet.master' does not exist.'

How do I correct this???

Thank you!!!

c:\inetpub\wwwroot\masters is your root now on a virtual directory. What did
you try?

I'm assuming MasterPageFile="CTMNet.master" would work

Jeff
I have a virtual directory titled Masters that is a subdirectory in my app.
The directory structure is in IIS is:
Default Web Site
- SiteInfo
- Masters (contains the CTMNet.master page)

The SiteInfo directory contains my default.aspx page that is attempting to
refer to ~/Masters/CTMNet.master.

Changing the references from "~/Masters/CTMNet.master" to "CTMNet.master"
made the problem worse, not better. It won't even launch with the change.
It will launch and run in IE as is, it is just that I get this error in
VS2008.

I am TRYING to follow Microsoft's recommendation for how to share a master
page across multiple applications. I would like to be able to maintain the
master page in one location.

Thanks!
Steve
Sep 8 '08 #3
I am TRYING to follow Microsoft's recommendation for how to share a master
page across multiple applications. I would like to be able to maintain
the
master page in one location.

Thanks!
Steve
So you have a master page working without trying to share between
applications I assume. Where are you reading about the MS recommendations?
Sep 9 '08 #4

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

Similar topics

6
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
12
by: Nathan Sokalski | last post by:
I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET 2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a *.dll with the name of the Project to a /bin/...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
1
by: John Kotuby | last post by:
Hi all, I have experienced several problems after installing SP1 for Visual Studio 2005 Professional. The problems are occurring on 2 different Windows XP SP2 development machines that have been...
1
by: DaveRook | last post by:
Hi I am using a master page for my web project, and it's all coded in C# (and it works). Within one of the pages I want to run some server sided code. I have added a button and double clicked it...
8
by: kcroyals1 | last post by:
Is anyone having the problem where Visual Studio 2008 hangs for minutes when switching to Design view of an aspx page? I know there's a hotfix, but it has been no help. My co-worker might have hit...
9
by: Joe Fawcett | last post by:
Dear All Can anyone explain why on some machines, when I choose to add a new item to a web site in VS 2008, I get the traditional dialogue that shows the checkbox for choose a master page and on...
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
3
by: Johnson | last post by:
I'm not sure if this is an IIS 5.1 issue or ASP.NET issue, or Visual Studio 2008 issue -- thus posting to 3 groups. Please don't be offended. The problem I'm encountering is that Visual Studio...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.