我遷移代碼調用從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