2010-02-12 143 views
0

我想部署/打包基於Visual Studio擴展的Windows Sharepoint Services 1.3(2009年3月CTP)的Visual Studio項目,但出現以下錯誤!HTTP請求未經客戶端身份驗證方案「協商」授權。

該HTTP請求未經授權,客戶端認證方案 '協商'。從服務器接收認證報頭是 「協商,NTLM」

我能夠通過瀏覽器訪問http://127.0.0.1:1378/SpService.svc; VseWss服務在身份爲網絡服務的Sharepoint管理中心v3應用程序池下運行。 Sharepoint服務使用默認設置進行安裝。網絡服務是本地管理員組的成員。

本機是Windows 2003 Standard Editon SP2,屬於域的一部分,我使用域用戶登錄;我的用戶是機器的本地管理員組的成員,我用這個登錄安裝了Sharepoint服務,這讓我成爲幾乎所有必需的Sharepoint安全組(Farm Administrator;網站集管理員等)的成員

我試過了stackoverflow和http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment論壇和幾乎嘗試了在這兩個不同崗位上提出的所有建議;但迄今爲止它們都沒有奏效!

VSeWSS1.3.log具有以下條目

2010/02/12 16:49:01 Error 
Error: System.ServiceModel.Security.MessageSecurityException 
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized. 
    at System.Net.HttpWebRequest.GetResponse() 
    at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) 
    --- End of inner exception stack trace --- 

Server stack trace: 
    at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory) 
    at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException) 
    at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) 
    at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) 
    at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) 
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 

Exception rethrown at [0]: 
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) 
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 
    at Microsoft.SharePoint.Tools.SPServiceReference.ISPService.GetWeb(String url) 
    at Microsoft.SharePoint.Tools.SharePointSolutions.SolutionDeployer.ValidateProjectDeployURL() 
    at Microsoft.SharePoint.Tools.SharePointSolutions.SolutionDeployer.Deploy() 
+0

早些時候訪問http://127.0.0.1:1378/SpService.svc瀏覽器時不斷提示登錄/密碼;然後我禁用了LSA'循環備份檢查(http://support.microsoft.com/kb/896861)和服務開始罰款在瀏覽器中! – 2010-02-12 10:52:02

回答

0

我從域中刪除了機器;卸載VSeWSS,Sharepoint和IIS。從域中刪除機器後重新安裝IIS。安裝Sharepoint和VSeWSS後;事情開始正常工作!

1

您也可以嘗試使用計算機的實際主機名而不是環回地址(127.0.0.1)的。如果使用本地主機或環回地址,則可能無法使用Kerberos進行登錄,這會導致某些類型的委派方案失敗。

可能發生的情況是,您的瀏覽器可能會無聲無息地「回退」使用NTLM,而其他程序(如VS的部署不會這樣) - 它們通常只使用Kerberos。所以請嘗試使用主機名而不是回送。如果這不起作用,那麼您的計算機上可能存在Kerberos問題。如果您感覺真的很難核心,那麼您可以閱讀Kerberos並下載WireShark的副本,然後查找「KRB5」類錯誤消息以準確查看失敗的內容,但這是相當大的時間投入。

+0

http:// machine:1378/SpService.svc和http://machine.mydomain:1378/SpService.svc,兩者在瀏覽器中均可打開;當我嘗試部署或打包我的項目時,聲明的錯誤僅在Visual Studio中出現! – 2010-02-12 10:59:17

+0

已編輯(請參閱帖子)。 – 2010-02-12 11:36:13

相關問題