Tag: sharepoint 2013

收到“无法找到类型或命名空间名称’LayoutsPageBase’的错误”

为了给您提供完整的视角,我尝试在SharePoint中创建自定义function区。 为此,我正在学习本教程 。 我创建了所需的function,并能够使用简单的JavaScript警报进行部署和测试。 现在我试图点击function区按钮调用ASPX页面。 为此,我在我的项目中创建了一个应用程序页面。 但是在ASP.NET页面的代码隐藏文件中,我收到以下错误: The type or namespace name ‘LayoutsPageBase’ could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CustomRibbonButton\CustomRibbonButton\Layouts\CustomRibbonButton\ApplicationPage1.aspx.cs 我已导入(我希望你在C#中称之为) Microsoft.SharePoint.WebControls with statement using Microsoft.SharePoint.WebControls; 从StackOverflow上的这个问题我可以看出LayoutsPageBase类在沙盒解决方案中不可用(路径为\UserCode\assemblies )。 所以在我的项目中,我去了References > Microsoft.SharePoint ,右键单击它以查看其属性。 其“属性中的Path窗口显示为C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.dll 。 这个错误的原因是什么?如何解决?

将可视Web部件部署到SharePoint 2013时出错(激活function)

我正在尝试使用Visual Studio 2013将简单的Web部件部署到SharePoint 2013,我收到以下错误: 部署步骤“激活function”中出错:此function区中未安装具有Id’….的function,并且无法添加到此范围。 花了很长时间试图找到解决方案。 几个博客和论坛谈论它并提供不同的解决方案(没有一个对我有用)。 function范围设置为站点,解决方案未设置为沙箱。 如果我选择跳过激活选项,则部署有效。 但是当我进入网站设置并查看function时,我找不到它。 (我查看了网站function和网站集function)。 我试图在几个不同的地方更改权限。 我让用户成为网站所有者以及网站集管理员(尝试过主要和次要),但它似乎没有什么区别。 我是整个复杂的SharePoint世界的新手,因为我缺乏确切的条款。 在使用这个农场解决方案之前,我尝试使用沙箱,一切正常:我能够进行调试和部署。 我知道有一种方法可以使用PowerShell进行部署,但我认为这不是理想的解决方案。 有什么建议? 谢谢!

使用webservices将文档上载到Sharepoint 2013 Online

我有一个客户在Sharepoint 2013 Online中实现客户门户。 当前程序通过邮件将文档分发给客户。 现在我们必须将文档上传到客户门户。 我尝试在sharepoint中使用copy webservice。 我创建了一个测试项目并将webservice添加为Web Reference并编写了以下测试代码: static void Main(string[] args) { string baseUrl = “https://mycustomer.sharepoint.com/sites/”; string customer = “customerportalname”; string serviceUrl = “/_vti_bin/copy.asmx”; string destinationDirectory = “/folder/”; string fileName = “uploaded.xml”; string username = “username@outlook.com”; string password = “password”; XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(“voorwielachterwieltrappersstuurframe”); byte[] xmlByteArray; using (MemoryStream memoryStream = new […]

validation网络凭据以访问客户端对象模型上的SharePoint站点

我正在使用小应用程序,这需要将所有用户都带到给定站点的所有组中。 我有两个网站; SharePoint 2010在线运行和SharePoint 2013在线运行。 我收到凭据错误… {“The remote server returned an error: (401) Unauthorized.”} 码。 public class Program { static void Main(string[] args) { string _siteURL = “https://intranet.co.uk”; NetworkCredential _myCredentials = new NetworkCredential(“user”, “password”, “https://intranet”); ClientContext _clientContext = new ClientContext(_siteURL); _clientContext.Credentials = _myCredentials; Web _MyWebSite = _clientContext.Web; GroupCollection _GroupCollection = _MyWebSite.SiteGroups; _clientContext.Load(_GroupCollection); _clientContext.Load(_GroupCollection, groups => […]