HTTP 请求未经客户端身份验证方案“协商”的授权。

发布于 2024-08-21 11:13:04 字数 3276 浏览 10 评论 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< /a> 通过浏览器; VseWss 服务在 Sharepoint Central Administration v3 应用程序池下运行,其标识为 Network Service。 Sharepoint Services 使用默认设置安装。网络服务是本地管理员组的成员。

该机器是Windows 2003 Standard Edition 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()

I am trying to Deploy/Package a Visual Studio Project based on Visual Studio Extensions for Windows Sharepoint Services 1.3 (March 2009 CTP) but getting the following error!

The HTTP request is unauthorized with client authentication scheme
'Negotiate'. The authentication header received from the server was
'Negotiate,NTLM'

I am able to access http://127.0.0.1:1378/SpService.svc through browser; VseWss service is running under Sharepoint Central Administration v3 application pool whose identity is Network Service. Sharepoint Services is installed with default settings. Network Service is member of local Administrators group.

The machine is Windows 2003 Standard Editon SP2 and is part of domain and I am logged on with a domain user; my user is member of machine' local Administrators group and I installed Sharepoint Service with this login which made me member of almost all required Sharepoint Security Groups (Farm Administrator; Site Collection Administrator etc)

I have tried stackoverflow and http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment forum and have tried almost everything suggested in different posts on these two; but none of it has worked so far!

VSeWSS1.3.log has the following entries

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()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月下伊人醉 2024-08-28 11:13:04

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

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

You also might try using the computer's actual hostname instead of the loopback address (127.0.0.1). If you use localhost or the loopback address, you probably won't be able to login using Kerberos, which would cause certain types of delegation scenarios to fail.

What may be happening is that your browser may be "falling back" silently to using NTLM, and other programs, such as VS's deployment don't behave that way -- they often only use Kerberos. So try using the hostname instead of loopback. If that doesn't work, you probably have an issue with Kerberos on your machine. If you are feeling really hard-core, you can read up on Kerberos and download a copy of WireShark and then look for the "KRB5" class error messages to see exactly what is failing, but this is a pretty large time investment.

谁许谁一生繁华 2024-08-28 11:13:04

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

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文