Error “The referenced file '/_catalogs/mycustompage.master' is not allowed on this page.” when using custom master page in application page
I am trying to use customer master page in my application page but getting following error:

Error

The referenced file '/_catalogs/mycustompage.master' is not allowed on this page.

Code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SomeCode.aspx.cs" Inherits="SomeCode.Code" MasterPageFile="~/_catalogs/mycustompage.master" %>



How do I fix this issue?
September 9th, 2015 12:31pm

Hi,

Please make sure you actually add the master file to your project and reference from folder which contains master page.

Besides, I suggest you change master page approach. More information about it, you can refer the link below:

http://blogs.msdn.com/b/bgeoffro/archive/2009/06/22/master-pages-revisited-references-to-master-pages-in-sharepoint.aspx

Feel freely to reply if there is any update.

Thanks,

Dean Wang

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 5:58am

Hi,

Please make sure you actually add the master file to your project and reference from folder which contains master page.

Besides, I suggest you change master page approach. More information about it, you can refer the link below:

http://blogs.msdn.com/b/bgeoffro/archive/2009/06/22/master-pages-revisited-references-to-master-pages-in-sharepoint.aspx

Feel freely to reply if there is any update.

Thanks,

Dean Wang

September 10th, 2015 7:02am

Hi,

>> If I add master page in my project won't it create two versions of master page?

Yes, it will.

About how to deploy a custom master page in SharePoint 2013 using Visual Studio, I suggest you refer to the link below and follow the steps in it:

http://frederik.se/how-to-deploy-a-custom-master-page-in-sharepoint-2013-using-visual-studio/

Thanks,

Dean Wang

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 10:15pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics