Tag: sharepoint

我可以使用Office Web Apps Server吗?

我想在办公室的浏览器中建立一个文件管理系统。 我找到了这个解决方案http://www.edrawsoft.com/officeviewer.php,但它使用了办公室的客户端副本。 我想使用Office Web Apps,但我的问题是……我是否需要通过SharePoint或其他Microsoft产品使用它,或者我是否可以将浏览器中的Office Web Apps用于我自己的文档系统

从ADFS声明auth

我尝试通过WPF应用程序连接到SharePoint Online实例。 我发现这篇文章描述了一个可能的解决方案,但问题是特定实例前面有一个Active Directory联合身份validation服务(ADFS),我不知道如何获取身份validation令牌。 (我无法为我的应用程序创建证书以对adfs进行身份validation。) 任何已经完成此操作的人都可以通过一些代码片段来支持我吗?

如何从Microsoft.SharePoint.Client.File对象获取文件大小?

我正在寻找一种从Microsoft.SharePoint.Client.File对象获取文件大小的好方法。 Client对象没有Length成员。 我试过这个: foreach (SP.File file in files) { string path = file.Path; path = path.Substring(this.getTeamSiteUrl().Length); FileInformation fileInformation = SP.File.OpenBinaryDirect(this.Context, path); using (MemoryStream memoryStream = new MemoryStream()) { CopyStream(fileInformation.Stream, memoryStream); file.Size = memoryStream.Length; } } 通过使用MemoryStream给了我一个长度,但它对性能MemoryStream 。 此文件也不属于文档库。 由于它是附加文件,我无法使用ListItemAllFields将其转换为ListItem对象。 如果我可以将它转换为ListItem ,我可以使用它来获取它的大小: ListItem[“File_x0020_Size”] 如何使用C#在SharePoint中获取Client对象的文件大小?

如何使用WebService将文件复制到SharePoint?

我正在编写一个winforms c#2.0应用程序,需要将XML文件放入SharePoint上的文档库中。 我想使用WebService而不是使用对象模型(这里没有sharepoint.dll引用) 我目前正在使用http://webserver/site/_vti_bin/copy.asmx webservice。 这是一些代码: byte[] xmlByteArray; using (MemoryStream memoryStream = new MemoryStream()) { xmlDocument.Save(memoryStream); xmlBytes = memoryStream.ToArray(); } string[] destinationUrlArray = new string[] {“http://webserver/site/Doclib/UploadedDocument.xml”}; FieldInformation fieldInfo = new FieldInformation(); FieldInformation[] fields = { fieldInfo }; CopyResult[] resultsArray; using (Copy copyService = new Copy()) { copyService.Credentials = CredentialCache.DefaultCredentials; copyService.Url = “http://webserver/site/_vti_bin/copy.asmx”; copyService.Timeout = 600000; […]

如何解决此错误,“尝试反序列化参数时出错”

我有一个Web服务,在一个环境中工作正常,但在另一个环境中没有。 Web服务从SharePoint获取文档元数据,它在我无法调试的服务器上运行但是通过日志记录我确认该方法成功进入和退出。 可能是错误的原因是什么? 错误信息是, The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://CompanyName.com.au/ProjectName:GetDocumentMetaDataResponse. The InnerException message was ‘Error in line 1 position 388. ‘Element’ ‘CustomFields’ from namespace ‘http://CompanyName.com.au/ProjectName’ is not expected. Expecting element ‘Id’.’. Please see InnerException for more details. InnerException是 捕获到System.ServiceModel.Dispatcher.NetDispatcherFaultException消息=“格式化程序在尝试反序列化消息时引发exception:尝试反序列化参数http://CompanyName.com.au/ProjectName:GetDocumentMetaDataResponse时出错。 InnerException消息是 […]

使用HTTP PUT将文件上载到Sharepoint(WSS 3.0)文档库

嗨,我有以下代码将文件上传到Sharepoint。 它使用HTTP PUT: public static string UploadFile(string destUrl, string sourcePath) { try { Uri destUri = new Uri(destUrl); FileStream inStream = File.OpenRead(sourcePath); WebRequest req = WebRequest.Create(destUri); req.Method = “PUT”; req.Headers.Add(“Overwrite”, “F”); req.Timeout = System.Threading.Timeout.Infinite; req.Credentials = CredentialCache.DefaultCredentials; Stream outStream = req.GetRequestStream(); string status = CopyStream(inStream, outStream); if (status == “success”) { outStream.Close(); WebResponse ores = […]

使用凭据与Sharepoint的客户端对象模型进行交互?

我需要编写一个小软件,它必须更新Sharepoint 2010上的一些列表。 我找到了可以使用url创建的“SPSite”,但我无法弄清楚如何指定我想要连接的用户。 用户不是当前的Windows用户,并且该程序未在服务器上执行。 我看到了提供“SPUserToken”的可能性,但在我的方法中我只有用户,域和他的密码,所以如何生成这个用户(我认为这个用户在执行代码的系统上是未知的,但在服务器上已知) 我在哪里可以指定? 谢谢!

用于C#ASP.NET开发人员的SharePoint

我被要求在接下来的几周内在SharePoint中创建一个网站,我对SharePoint完全不熟悉。 有没有人有关于如何使用自定义SQL Server数据库创建自定义表单,使用基本CRUD操作等基本操作的任何好示例/教程? 还有什么方法可以在ASP.NET中编码(使用代码隐藏页面),但是使用SharePoint外观和身份validation的东西?

如何检查单词是否以给定字符开头?

我有一个Sharepoint项目列表:每个项目都有标题,描述和类型。 我成功检索了它,我称之为result 。 我想首先检查结果中是否有任何项目以A开头,然后是B,然后是C,等等。我必须为每个字母字符做同样的事情,然后如果我找到一个以这个字符开头的单词,我将不得不显示粗体字符。 我最初使用此function显示字符: private string generateHeaderScripts(char currentChar) { string headerScriptHtml = “$(document).ready(function() {” + “$(\”#myTable” + currentChar.ToString() + “\”) ” + “.tablesorter({widthFixed: true, widgets: [‘zebra’]})” + “.tablesorterPager({container: $(\”#pager” + currentChar.ToString() +”\”)}); ” + “});”; return headerScriptHtml; } 如何检查单词是否以给定字符开头?

方括号在下面的代码中是什么意思?

我从http://msdn.microsoft.com/en-us/library/dd584174(office.11​​).aspx获取以下代码,用于在webpart工具窗格中添加自定义属性。 方括号( [] )在下面的代码中的含义是什么? [Category(“Custom Properties”)] [WebPartStorage(Storage.Personal)] [FriendlyNameAttribute(“Custom Color”)] [Description(“Select a color from the dropdown list.”)] [Browsable(true)] [XmlElement(typeof(System.Drawing.KnownColor))] public System.Drawing.KnownColor MyColor { get { return _myColor; } set { _myColor = value; } }