SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created feature that have a module that have a element file and a default aspx inside of it.

The element file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">
  <Module Name="Pages2" Url="$Resources:cmscore,List_Pages_UrlName;" Path="Pages2">
    <File Url="NewsApproval.aspx" Type="GhostableInLibrary" Path="default.aspx" >
      <Property Name="Title" Value="News - Information"/>
      <Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/InformationMessage.aspx, Text page" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_welcomepage_name;" />

      <AllUsersWebPart WebPartZoneID="left">
        <?xml version="1.0" encoding="utf-8"?>
        <WebPart xmlns:xsd="" xmlns:xsi="" xmlns="">
          <Description> </Description>
          <Height />
          <Width />
          <DetailLink />
          <HelpLink />
          <PartImageSmall />
          <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
          <IsIncludedFilter />
          <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
          <ContentLink xmlns="" />
          <Content xmlns="">Hello world!</Content>
          <PartStorage xmlns="" />

and the default is just the standard one:

<%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>

The pagelayout for it looks like this:

%@ Page language="C#"   Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
    <SharePointWebControls:ListItemProperty Property="Title" maxlength="40" runat="server"/>

<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
    <SharePointWebControls:CssRegistration ID="StartPageLayoutCss" name="<% $SPUrl:~SiteCollection/_layouts/15/AA/portal/css/pagelayouts/PageLayouts.less%>" After="corev4.css" runat="server"/>

<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
    <div id="calendar-archive-main-zone" >

        <div class="calendar-archive-left-zone" id="info-zone">
            <%--Toggle month/day-view--%>
            <%--Add code for this, use querystring param: ?CalendarPeriod=day or ?CalendarPeriod=month--%>
            <%--  --%>
            <%--<div id="breads"><a id="calendar-breadcrumb" href="/"></a></div>--%>
            <WebPartPages:WebPartZone runat="server" Title="loc:Left" ID="Left" FrameType="TitleBarOnly" AllowLayoutChange ="False"  AllowPersonalization="False"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>


        <div class="ms-clear"></div>

     <script type="text/javascript">
         $(document).ready(function () {
             setTimeout("location.href = '/';", 2500);


As a administrator I can access /pages/newsapproval.aspx but when I try to visit it as a publisher I get access denied, This site has not been shared with you.

Any kind of help is appreciated

share|improve this question
First, don't hang out your clients in code snippets, it's probably not liked by the customer. Secondly, try to check in the page or publish it, that should make it available to all users – Robert Lindgren May 23 '13 at 18:03
If that does not help, try removing Webparts, could be one of them that throws the acces denied (if so, you need to look for the source be debugging the webpart code) – Robert Lindgren May 23 '13 at 18:09
Thanks for the notice, I will check that out. – Rohander May 23 '13 at 18:28
I tried re-publish, approve and check it in but its still not working, also tried with removing the webpart. :/ – Rohander May 23 '13 at 18:44

If checking the page in does not work, check the ULS logs (Found in the 15-hive under LOGS) for errors when loading the page.

A, not so wild, guess would be that some resource that the page is using is not accessible to all users. This could for example be the Master page not being checked in, or some script calling a location where other users do not have access.

share|improve this answer
I found the issue, the pagelayout was not published, but the page was, publishing the pagelayout did the trick! – Rohander May 23 '13 at 19:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.