我迁移代码调用从2010年至2013年的Project Server 2013 PSI从SharePoint 2013
我有我在Sharepoint调用PSI部署一个用户控件。在2010年它运作良好。现在在2013和声明身份验证中,我总是会得到:“HTTP请求未经客户端身份验证方案'Ntlm'的授权。从服务器收到的身份验证头是'NTLM,Negotiate'。”当我用任何用户(甚至是项目管理员)调用任何PSI(甚至GetCurrentUserUid)时。
它看起来像凭证不传递给PSI,它将其称为匿名。任何人都可以帮忙
我从SharePoint执行的代码又如:
ProjectContext projContext = new ProjectContext(PROJECT_SERVER_URL);
projContext.Load(projContext.EnterpriseResources);
projContext.ExecuteQuery();
我得到拒绝访问。
谢谢
你修改你的app.config尚未凭证?看看[我的答案在这里]的后半部分(http://stackoverflow.com/questions/2608887/sharepoint-web-services-the-http-request-is-unauthorized-with-client-authenti/2609909#2609909)查看您需要修改的部分。 – 2013-02-20 13:20:39
@Kit在我的情况下,它将是web.config。我通过代码配置客户端,因此web.config中没有任何内容。 'This.HttpBinding = 新的BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly); this.HttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;' – David 2013-03-04 10:08:32