By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,665 Members | 1,900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,665 IT Pros & Developers. It's quick & easy.

Visual Studio 2008 - Master Page Error

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
"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

P: n/a

--
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.