Saturday, October 1, 2011

SharePoint 2010 - Server error: The URL is invalid, it may refer to a nonexistent file or folder or refer to a valid file that is not in the current Web

Scenario:

SharePoint Designer throws the error "Server error: The URL is invalid, it may refer to a nonexistent file or folder or refer to a valid file that is not in the current Web" when you attempt to open/check-in/check-out/upload a file.

Explanation:

While there could be many reasons for this misleading error to show up, one of the reason is low disk space in the database server.

SharePoint 2010 - How to specify a different master page for a publishing page layout

What?

How to associate a different master page than the default master page for a publishing page layout in SharePoint 2010?

Why?

There may be scenarios when certain pages in a SharePoint site require associations with a different master page(s)..

Typical examples could be pages that are required to be loaded inside SharePoint dialog boxes. These type of pages show up fine with minimal.master master page associated with them.

How?

Applying “minimal.master” master page to a page layout "CustomDialogPages.aspx" did not work.

When the page layout inherits from the 'PublishingLayoutPage' class the master page gets set on PreInit(), that's why it ignores what we put in the page directive.

There are 2 possible ways to get this to work: