Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search 将OOTB Web部件添加到SharePoint应用程序_Search_Sharepoint_Sharepoint Apps_Webpartpage - Fatal编程技术网

Search 将OOTB Web部件添加到SharePoint应用程序

Search 将OOTB Web部件添加到SharePoint应用程序,search,sharepoint,sharepoint-apps,webpartpage,Search,Sharepoint,Sharepoint Apps,Webpartpage,我正试图使用Office 365开发站点在SharePoint应用程序中添加OOTB Web部件(实际上是创建搜索页面的变体),但任何OOTB Web部件都会出现这种情况。创建页面时的默认代码当然是: <%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.Shar

我正试图使用Office 365开发站点在SharePoint应用程序中添加OOTB Web部件(实际上是创建搜索页面的变体),但任何OOTB Web部件都会出现这种情况。创建页面时的默认代码当然是:

<%@ Page language="C#" MasterPageFile="~masterurl/default.master"
    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, 
    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" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, 
    PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
  <SharePoint:ScriptLink name="sp.js" runat="server" OnDemand="true" 
      LoadAfterUI="true" Localizable="false" />
</asp:Content>

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
  <WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" 
      ID="full" Title="loc:full" />
</asp:Content>

我只想将SearchArea Web部件添加到我在测试中经常看到的区域中: “无法为此Web部件创建XmlSerializer”

这看起来很简单,但我总是犯这个错误。这基本上发生在任何OOTB Web部件上。我做错了什么?同样,我只是有一个SharePoint应用程序,它将部署一个高度定制的搜索体验,但必须在某些区域使用OOTB SharePoint控件进行搜索


想法?

我也有同样的问题,但是使用“内容编辑器”OOTB web部件,在我们的功能激活事件处理程序中创建、自定义和添加。XmlSerialization错误发生在将部件添加到页面的web部件集合时,因此我假设在最初创建web部件时正确处理了XML字符串。