[英]The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'
I am trying to program a VisualWebPart using Visual Studio 2010 which has to do a simple thing: invoke a web service (hosted in a remote server, NOT locally). 我正在尝试使用Visual Studio 2010对VisualWebPart进行编程,该Visual Studio必须做一个简单的事情:调用Web服务(托管在远程服务器中,而不是本地)。 When I execute within the Sharepoint site (version 2010, which I have published in my IIS) I get this error: 当我在SharePoint网站(在IIS中发布的2010版)中执行时,出现此错误:
"The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'." “ HTTP请求未经客户端身份验证方案'Ntlm'的授权。从服务器收到的身份验证标头为'NTLM'。”
Pardon my ignorance, but the only difference here is the case of the Ntlm authentication scheme! 请原谅我的无知,但是唯一的区别是Ntlm身份验证方案! I have been all over the web and found many related problems, but none of the solutions worked. 我到过网络,发现许多相关问题,但是没有一种解决方案有效。 Almost ALL solutions i found involve modifications in the webservice security configuration, this is not an option for me. 我发现几乎所有解决方案都涉及对Web服务安全性配置的修改,这对我来说不是一个选择。
Looking for a solution, I created a sample windows form and invoked the web service from it: no problems whatsoever. 在寻找解决方案时,我创建了一个示例Windows窗体并从中调用Web服务:没有任何问题。
In order to be able to invoke the webservice correctly this is the necessary security configuration: 为了能够正确调用Web服务,这是必需的安全性配置:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="Ntlm" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
I believe the problem is that I haven´t been able to properly set this security property to the web.config of my Sharepoint site, since I tried to put it in the security tag that appears in the web.config but still get the same error. 我认为问题在于我无法正确地将此安全属性设置为我的Sharepoint网站的web.config,因为我试图将其放置在出现在web.config中的安全标记中,但仍然获得相同的权限错误。
Any further information needed please ask, I am REALLY desperate, for days I have been with the SAME error. 需要任何进一步的信息,请问我,我真的很绝望,因为我一直都遇到SAME错误。
In the end I was given permissions in their server: more precisely in the database which was the one that wouldn't let me create the web part in the server. 最后,我被授予了他们服务器的权限:更确切地说,是数据库中不允许我在服务器中创建Web部件的权限。 Once this was done, the call to the webservice worked just fine, because they have the web.config correctly configured. 完成此操作后,对Web服务的调用就可以正常工作,因为它们已正确配置了web.config。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.