.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Master Page Error - cannot be loaded

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :SharePoint
We're using WSS 3.0
I'm not sure what's gone wrong but it all happened after authentication was set to Kerberos and then back to NTLM.
That was all sorted but now we have another problem.

The live site works fine when browsing, but when opening a page in Sharepoint Designer it says Master Page Error - The master page file '~masterurl/default.master' cannot be loaded.
If i try and attach the master page I get an error stating 'Make sure Frontpage Extensions or Sharepoint Services are installed on the server.' and there is nothing in the Details.

Sharepoint Services are installed, we have two other sites (web applications) that are working fine.

When I click on the Web Parts Taskpane in Designer it says it can only be run on servers running Windows Sharepoint Services.
Also when opening the site in Designer it asks me if I want to edit the Live Web Site or a local copy, its never done that and doesn't for the other sites.

Any idea where I've gone wrong?

View Complete Post

More Related Resource Links

'Master Page cannot be loaded' Error

Hi, I suddenly started developing some near-fatal errors with my Sharepoint site. I found that it was somehow difficult to edit the home page for the site collection, so I decided to create another 'default.aspx' and replace it as the hompage. Problem is,  the new home page was still using the original master page and looked funny, so I copied and replaced the old master page, keeping it as a copy just case. When the new home page still looked funny, I deided to change everything back, but then the following error occured:

'The Master Page cannot be loaded. "File Name"
Please attach a different Master Page or go to Code View to resolve the error'.

The link to attach a different master page doesn't do anything, and the 'go to Code View' link doesn't show the error. Strangely the file name of the master page it can't load is not the default master page, and more annoyingly, the file exists!!! I don't know what to do. In Internet Explorer, the home page only shows this erroe: 'File Not Found'.

Help me, what did I do wrong?

Master-Detail GridView in Single Page example with paging throws error

___http://www.java2s.com/Code/ASP/Data-Binding/MasterDetailGridViewinSinglePage.htmI followed example at the link above.When I enablind paging=true (by pagesize=3).and clicking to pages 2|3|4 etc and so;error occuringIndex was out of range. Must be non-negative and less than the size of the collection.at cs line :sourceProducts.SelectParameters[0].DefaultValue = gridMaster.DataKeys[e.Row.DataItemIndex].Value.ToString();got any idea?what should I make to fix this ? is this error  fixable ?thanks much.

Master Page Error



I am getting following error message. 

"Master Page Error

The page contains markup that is not valid when attached to a Master Page.

Correct the problem in code view"

What could be the problem ?

The last change i had done in the pages is;  added a  conditional xsl statement in the HTML command button. the code for conditional execution is as follows

<input type="button" value="OK" name="btnSave1" style="width:72px; height:22px;" >                                                  

Error: There are no page layout files available in the master page library of the top-level site.

I exported one of the subsite using stsadm and imported into a new site collection, I could access the new site collection but whenever I try to create a new page in my new site collection I get the following error.

There are no page layout files available in the master page library of the top-level site. Add one or more page layouts to this library before you create a page or set page properties.

Please help. Thanks.

Master page error when trying to run project



I trying to run my project and I get  the following error 'lstpreferredtheme_selectedindexchanged is not a member of ASP.Masterpages_Masterpage_master

Even I've named the id of my dropdown list lstpreferredtheme which I trying to call. My code is below

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    <form id="form1" runat="server">
    <div id="PageWrapper">
        <div id="Header">   <a href="~/" runat="server">Header Goes Here</a></div>
        <div id="MenuWrapper">

Page goes to error after click before page fully loaded.


Hi all ,

 When user cliick on the control before page fully loaded it goes to error page. 

Following is the trace.

Execution Error

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

  at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)

  at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument)

  at System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection)

  at System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)

  at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)


error.aspx page reports that Page.MasterPageFile = ~/masterurl/default.master not ~/_layouts/simple.


This one is driving me nuts.

I'm intercepting Pages using HTTPModules so that I can change the Master Page before the page loads. This works as expected on everything except error.aspx in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS folder. Despite the fact that error.aspx specifies MasterPageFile="~/_layouts/simple.master" I keep getting Page.MasterPageFile = ~/masterurl/default.master instead!

Anybody know why this is the case?

Create new page from master causes list threshold error?


When I try to create a new page from master I get:

Server error: the attempted operation is prohibited because it exceeds the list view threshold enfoced by the administrator.

Why would I get this error from trying to create a new page from master?

Getting an error while attaching the master page to custom .aspx


Hi ,

I am getting the following error while I am trying to attach the master page to the custom form

The virtual path '/_catalogs/masterpage/default.master' maps to another application, which is not allowed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The virtual path '/_catalogs/masterpage/default.master' maps to another application, which is not allowed.

Actually I am developing the association form in the custom work flow , I am calling the master on the On PreINt event of the page



Server Error after Trying to Upload New Master Page


I edited our master page in SharePoint Designer 2007 and uploaded the new version.

The new version never made it to the server, and I can no longer authenticate in to make changes. I receive a 404 error - telling me "The file /Local%20Settings/Temporary%20Internet%20Files/Content.IE5/EMWCDP71/_controltemplates/DesignModeConsole.ascx does not exist."

All of our other users can still authenticate, I am the only one receiving this error.

I found posts about tildes being stripped in Designer (which they were in the file I attempted to upload)

Changed the file and reuploaded and I am still the only one who is receiving the server error.

Any ideas would be appreciated.


Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Handling 404 page not found with Error page



      How do i handle 404 page not found?

Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


Re-positioning an HTML container with javascript onresize with a Master page.


I have an HTML <div> container that I float to the right of a gridview.  When the browser window is maximized, it looks fine.  When minimized, the gridview positions below the floating container and most of the data is pushed off the bottom of the browser - you have to scroll down to see it.

If I position the floating container above the gridview it looks fine in a minimized window, but looks real bad when maximized.

What I want to do is use a javascript: onresize event to re-position the floating container up or down depending on the window.inner.width AND do it with a Master/Content page structure AND do it for only the one page where needed.

I can capture the onresize event and display the window dimensions but haven't figured-out how to do it with a Content page that still uses the Master page.  I think I'm having a very "thick" week...

- Tinker


urlrouting - page not found error


I have a dynamic data site setup and running locally fine from vs 2008.

When i deploy to a remote windows 2003 server (IIS6), all the pages also work ok apart from one page/table.  I can access it's list page,  but the edit and insert pages throw 404 errors.

I'm thinking it's a url routing/hosting issue as i've copied back the database from the remote server and it all works fine on my local machine.

Is there anything i can do to debug this behaviour?

Below is my register routes entry from the global.asax

Any suggestions greatly appreciated as, i've been stuck on this for days :(

public static void RegisterRoutes(RouteCollection routes)
    MetaModel model = new MetaModel();
    model.FieldTemplateFactory = new AdvancedFieldTemplateFactory();

    model.RegisterContext(typeof(Sponsorship.Data.Entities), new ContextConfiguration() { ScaffoldAllTables = false });
    model.DynamicDataFolderVirtualPath = "~/admin/DynamicData";

    routes.Add(new DynamicDataRoute("admin/{table}/{action}.aspx")
        Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),

Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Not getting multiple composite controls on master page


I have created two composite controls in the same assembly and registered that assembly in a master page using <%@ Register tag.

When I try to use these controls using the registered tag prefix I am getting only one control along with the tagprefix .

How to get all the composite controls present in the registered assembly?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend