SharePoint 2013自定义页面

时间:2013-04-11 13:15:52

标签: sharepoint sharepoint-2013

我使用SPWebApplication.UpdateMappedPage用我的自定义页面更新默认应用程序页面。这似乎适用于Sharepoint 2010.但是,当我在任何WebApplication上使用SharePoint 2013中的相同代码时,它不会反映更改。它默认返回到特定的SharePoint页面(例如:15 \ layouts \ accessdenied.aspx)并且不使用我的自定义页面(例如:15 \ layouts \ custompages \ accessdenied.aspx)。

当我使用此命令时: Get-SPCustomLayoutsPage -Identity“AccessDenied”-WebApplication MyWebApp

它表明WebApplication已使用新值进行更新。

我已按照以下步骤操作:http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.updatemappedpage.aspx但不适用于SharePoint 2013。

这里有什么我想念的吗?

2 个答案:

答案 0 :(得分:2)

这是一个已确定的问题,希望在将来的修补程序中得到解决。以下是我的发现:http://blog.randomdust.com/index.php/2013/07/custom-access-denied-page-in-sharepoint-2013/

答案 1 :(得分:0)

PowerShell脚本:

我们在Web应用程序中创建并应用了自定义拒绝访问页面

  
      
  1. 在Layouts文件夹和WEB FRONT END服务器中创建“custompages”文件夹:   “c:\ Program files \ Common Files \ Microsoft Shared \ Web Server Extensions \\   15 \ TEMPLATE \ LAYOUTS \ custompages \ Accessdeniederror.html“

  2.   
  3. 运行PowerShell命令:
       Set-SPCustomLayoutsPage -Identity“AccessDenied”
    -RelativePath   “/_layouts/15/custompages/Accessdeniederror.html” - WebApplication“http://raghuserver/

  4.   
  5. 检查应用的自定义布局页面:
       Get-SPCustomLayoutsPage -WebApplication“http://raghuserver/

  6.   
  7. 运行iisreset.exe。

  8.