none
Office 365 and hosting page in ClientWebPart using WebPartPages:AllowFraming RRS feed

  • Question

  • Hi,

    I am getting the error "The type or namespace name 'WebPartPages' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)."  But I can't figure out what else should be in my references. 

    I have created an SP 2013 app which I am deploying to an Office 365 Developer Sharepoint App like: https://MyDomain.sharepoint.com/sites/Dev/   I have been following  examples like "Can App Parts be used on SharePoint-Hosted pages?" (http://social.msdn.microsoft.com/Forums/sharepoint/en-US/abb96582-e5b1-4fbd-9e63-2ffc01780835/can-app-parts-be-used-on-sharepointhosted-pages

    Under references I have

    Microsoft.SharePoint.Client
    Microsoft.SharePoint.Client.Publishing
    Microsoft.SharePoint.Client.Runtime
    Microsoft.Visualstudio.SharePoint

    When I try to add a reference to Microsoft.Sharepoint - I don't see it in the list nor  a WebPartPages reference in the list.    My page looks like...

     

    <%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Language="C#" %>
    <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <!-- The following tells SharePoint to allow this page to be hosted in an IFrame -->
        <WebPartPages:AllowFraming runat="server" />
    

     

    Any advice how to correct what I am doing wrong?

    Thanks


    va

    Friday, July 5, 2013 10:14 PM

Answers

  • Hi - Is this a SharePoint-hosted app or a auto/provider-hosted app?  If it is a SharePoint hosted app then you do not need to add references since only client (JavaScript) code can be used.

    Mike Morton - Sr. Program Manager - Visual Studio

    • Marked as answer by MrWinky Sunday, July 14, 2013 3:52 AM
    Thursday, July 11, 2013 7:38 PM
    Moderator

All replies

  • Hi - Is this a SharePoint-hosted app or a auto/provider-hosted app?  If it is a SharePoint hosted app then you do not need to add references since only client (JavaScript) code can be used.

    Mike Morton - Sr. Program Manager - Visual Studio

    • Marked as answer by MrWinky Sunday, July 14, 2013 3:52 AM
    Thursday, July 11, 2013 7:38 PM
    Moderator
  • It was Auto hosted but I was placing it in the wrong file.  I have it working now - thanks.
    Sunday, July 14, 2013 3:52 AM