【问题标题】:The HTTP request is unauthorized with client authentication scheme 'Negotiate'.HTTP 请求未经客户端身份验证方案“协商”的授权。
【发布时间】:2011-01-16 02:38:17
【问题描述】:

我正在尝试基于 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()

【问题讨论】:

标签: visual-studio-2008 sharepoint vsewss


【解决方案1】:

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

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

【讨论】:

【解决方案2】:

我从域中删除了机器;卸载 VSeWSS、Sharepoint 和 IIS。从域中删除机器后重新安装 IIS。安装 Sharepoint 和 VSeWSS 后;一切都开始正常了!

【讨论】:

    猜你喜欢
    • 2012-04-10
    • 1970-01-01
    • 2018-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-22
    • 1970-01-01
    相关资源
    最近更新 更多