我正在使用Diagnostic ToolsVisual Studio 2015调试SharePoint Web部件.
我附加了几个w3wp.exe进程,窗口显示以下消息:
Multiple processes are being debugged, but this window is only showing data for w3wp.exe (PID: 1208).
那很好,但我如何改变它显示的过程?
debugging sharepoint process visual-studio debug-diagnostic-tool
我有一个简单的2D字符串数组,我想把它填入MOSS中的SPFieldMultiLineText.这映射到ntext数据库字段.
我知道我可以序列化为XML并存储到文件系统,但我想在不触及文件系统的情况下进行序列化.
public override void ItemAdding(SPItemEventProperties properties)
{
// build the array
List<List<string>> matrix = new List<List<string>>();
/*
* populating the array is snipped, works fine
*/
// now stick this matrix into the field in my list item
properties.AfterProperties["myNoteField"] = matrix; // throws an error
}
Run Code Online (Sandbox Code Playgroud)
看起来我应该可以做这样的事情:
XmlSerializer s = new XmlSerializer(typeof(List<List<string>>));
properties.AfterProperties["myNoteField"] = s.Serialize.ToString();
Run Code Online (Sandbox Code Playgroud)
但这不起作用.我发现的所有示例都演示了写入文本文件.
我在这里有这个网站:http: //msdn.microsoft.com/en-us/library/jj164022(v = office.15).aspx
某些部分的文本说:以下JavaScript代码演示了如何使用JQuery生成此GET请求,该请求返回所有站点列表的JSON表示.它还假定您具有存储在accessToken变量中的有效OAuth访问令牌.如果您从应用程序Web中进行此调用,则不需要访问令牌,就像在SharePoint托管的应用程序中一样.
jQuery.ajax({
url: http:// site url/_api/web/lists,
type: "GET",
headers: {
"ACCEPT","application/json;odata=verbose",
"Authorization", "Bearer " + accessToken
},
})
Run Code Online (Sandbox Code Playgroud)
具体问题是如何获取访问令牌?
如何在脚本编辑器Web部件中使用JavaScript获取当前用户名?
我无法理解这个概念,首先是它所属的概念.它只是一个Shrepoint概念还是更像ASP.NET或IIS级别的概念?它是否只影响身份验证,如果是,它如何影响身份验证?或者它对应用程序有什么影响?我知道这是一个广泛的问题,但我用Google搜索了大约15分钟,但未能找到答案.对我来说这对我来说并不那么重要,但我很好奇.
您能否提供一个资源的链接并解释这个?谢谢!
@Edit:我的意思是像身份验证提供程序中的区域:表单区域:Intranet(Internet,默认)
@Edit:从我现在所理解的情况来看,这些区域与IIS Web应用程序与sharepoint Web应用程序的关联以及与此相关的网站集有关.例如,您可以扩展Web应用程序以创建新的IIS Web应用程序,但从sharepoint的角度来看,它只是指向具有相同网站集集的同一Web应用程序的另一个URL.扩展IIS Web应用程序可以具有与其关联的不同共享点区域(或者可以是相同的区域),从而提供对同一共享点应用程序的不同访问点使用不同身份验证方法的方法.
我在这儿吗?
我有这个CAML:
query.Query = @"<Where><Eq><FieldRef Name='MessageID' /><Value Type='Text'></Value></Eq></Where>";
Run Code Online (Sandbox Code Playgroud)
这将检查MessageID = string.empty()的值
我想检查的是null ....不是空字符串...
这可能与CAML有关吗?
更新一个重新回顾这个问题的有趣时刻.当SharePoint 2010开始占据时,感知是否仍然相同?当然,实施2010并非没有自己的挑战,但其中一个是商业认知吗?
更新:我们的实施现在正在高速发展,一些高调的项目将在未来几周内上线,所以我很想知道环境是否已经改变.
原始问题
我们的工作环境中存在一个问题,即SharePoint的感知是:
a)金色的子弹,是我们所有问题的答案.
b)应用程序是否解决了特定问题.
c)令人沮丧的工具,不能满足他们的严格要求.
现在我认为SharePoint(或者更具体地说是我们的Microsoft Office SharePoint Server 2007)是一个基于各种低级Microsoft技术(IIS,ASP.Net,WSS 3.0,.Net Framework,Windows Workflow Foundation等)的框架.因此可以发展为做任何事情(给定时间和资源).
在我的组织(以及其他我确定的其他人)中形成的态度是微软营销机器和组织者希望在尽可能多的人面前获得"金子弹"的愿望,而不是说'为什么? " 或'为什么?' 或者在某些情况下甚至是"怎么样?"
这是其他SharePoint开发者共享的态度和看法吗?
我真的在寻找一个小代码片段,或者是关于这个主题的好教程.
我有一个C#控制台应用程序,我将用它以某种方式将列表项添加到我的自定义列表.我也创建了一个自定义内容类型.因此不确定是否需要从此内容类型创建C#类.也许不是.
提前致谢
我需要使用.NET(C#)中的客户端对象模型将文档上载到SharePoint列表或文件夹.做这个的最好方式是什么?
要求如下:
设置元数据值
文件大小没有限制
必须使用超出列表视图阈值的库
我正在尝试对Sharepoint进行身份验证,以便我可以将文件上传到特定的Sharepoint站点.
我正在尝试使用X.509证书来检索访问令牌,但我一直在(401):未经授权.
这是我尝试使用证书检索访问令牌的方式:
string authority = SettingsHelper.Authority;
string clientID = SettingsHelper.ClientId;
string serverName = SettingsHelper.SharepointServerName;
//Retreive the certificate path
string certFile = Server.MapPath(SettingsHelper.CertificatePath);
string certPassword = SettingsHelper.CertificatePassword;
AuthenticationResult authenticationResult = null;
AuthenticationContext authenticationContext = new AuthenticationContext(authority);
//Create the certificate file, using the path (certFile), password (certPassword) and the MachineKeySet
X509Certificate2 cert = new X509Certificate2(certFile, certPassword, X509KeyStorageFlags.MachineKeySet);
//Create the ClientAssertionCertificate using the clientID and the actual certificate
ClientAssertionCertificate cac = new ClientAssertionCertificate(clientID, cert);
//Retreive the access token using the serverName and …Run Code Online (Sandbox Code Playgroud) sharepoint ×10
c# ×3
javascript ×2
oauth ×2
access-token ×1
content-type ×1
debugging ×1
file-upload ×1
jquery ×1
moss ×1
office365 ×1
process ×1
wss ×1
zones ×1