3

I use SPWebApplication.UpdateMappedPage to update the default application pages with my custom pages. This seems to work with Sharepoint 2010. However, when I use the same code in SharePoint 2013 on any WebApplication, it does not reflect the changes. It defaults back to the specific SharePoint page (ex: 15\layouts\accessdenied.aspx) and does not use my custom page (ex: 15\layouts\custompages\accessdenied.aspx).

When I use this command: Get-SPCustomLayoutsPage -Identity "AccessDenied" -WebApplication MyWebApp

it shows that the WebApplication is updated with the new value.

I have followed the steps from : http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.updatemappedpage.aspx but does not work on SharePoint 2013.

Is there something that I'm missing here?

1
  • try to edit manifest file and set there lists full controlss or site colletions full controlls Commented Apr 12, 2013 at 10:36

2 Answers 2

2

This is an identified issue and will hopefully be resolved in a future hotfix. Here are my findings: http://blog.randomdust.com/index.php/2013/07/custom-access-denied-page-in-sharepoint-2013/

Sign up to request clarification or add additional context in comments.

Comments

0

PowerShell Script:

We created and applied the custom Access Denied page in the web applications

  1. Create the “custompages” folder in Layouts folder and WEB FRONT END server: "c:\Program files\Common Files\Microsoft Shared\Web Server Extensions\
    15\TEMPLATE\LAYOUTS\ custompages \Accessdeniederror.html"

  2. Run PowerShell Command :
    Set-SPCustomLayoutsPage –Identity "AccessDenied"
    –RelativePath "/_layouts/15/custompages/Accessdeniederror.html" -WebApplication "http://raghuserver/"

  3. Check Custom Layouts Pages Applied:
    Get-SPCustomLayoutsPage –WebApplication “http://raghuserver/

  4. Run iisreset.exe.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.