0

我正在尝试基于 Visual Studio Extensions for Windows Sharepoint Services 1.3(2009 年 3 月 CTP)部署/打包 Visual Studio 项目,但出现以下错误!

HTTP 请求未经客户端身份验证方案“协商”的授权。从服务器收到的身份验证标头是“协商,NTLM”

我可以通过浏览器访问http://127.0.0.1:1378/SpService.svc ;VseWss 服务在标识为网络服务的 Sharepoint Central Administration v3 应用程序池下运行。Sharepoint Services 使用默认设置安装。网络服务是本地管理员组的成员。

这台机器是 Windows 2003 Standard Editon SP2 并且是域的一部分,我使用域用户登录;我的用户是机器的本地管理员组的成员,并且我使用此登录名安装了 Sharepoint 服务,这使我成为几乎所有必需的 Sharepoint 安全组的成员(农场管理员;网站集管理员等)

我已经尝试过 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()
4

2 回答 2

1

您也可以尝试使用计算机的实际主机名而不是环回地址 (127.0.0.1)。如果您使用 localhost 或环回地址,您可能无法使用 Kerberos 登录,这会导致某些类型的委派方案失败。

可能发生的情况是,您的浏览器可能会默默地“退回”到使用 NTLM,而其他程序(例如 VS 的部署)则不会这样做——它们通常只使用 Kerberos。所以尝试使用主机名而不是环回。如果这不起作用,您的机器上的 Kerberos 可能存在问题。如果您觉得自己真的很顽固,您可以阅读 Kerberos 并下载 WireShark 的副本,然后查找“KRB5”类错误消息以准确查看失败的原因,但这是一个相当大的时间投资。

于 2010-02-12T10:57:18.480 回答
0

I removed the machine from domain; uninstalled VSeWSS, Sharepoint and IIS. Reinstalled the IIS after removing the machine from domain. After installing Sharepoint and VSeWSS; things started working fine!

于 2010-02-17T08:45:02.060 回答