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?