我有一个用VB.NET编写的ASP.NET Web应用程序.应用程序的一部分对内部ASMX文件进行AJAX调用,后者又调用远程Web服务,该服务只是一个ASMX文件.通常这工作正常,并已部署了几次,工作正常.但是,一个客户端从AJAX调用获取消息:
HTTP请求未经授权,客户端身份验证方案为"匿名".从服务器收到的身份验证标头是"NTLM".
我已经搜索了大量试图解决此问题的网站,但我似乎无法找到适合我的任何答案.
我无法在我的测试服务器上复制错误,这与客户端Win2003 IIS6相同.
远程Web服务部署在Windows 2008 r2 - IIS7.5上.仅使用"匿名"身份验证部署远程服务.客户端部署使用Anonymous和"集成Windows身份验证"进行设置.我尝试在两个实现上更改身份验证级别,但无法复制该问题.我最接近的是当我将远程服务IIS身份验证设置为
HTTP请求未经授权使用客户端身份验证方案'Ntlm'.从服务器收到的身份验证标头是''.
在web.config文件中,对远程服务的引用是:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SVCMappingSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://svc.website.com/services/myService.asmx" binding="basicHttpBinding" bindingConfiguration="SVCMappingSoap" contract="SVCMappingService.SVCMappingSoap" name="SVCMappingSoap"/>
</client>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
我尝试更改部分中的一些设置<security>但仍无法复制.
我尝试使用SAP ws时,我遇到一个.net问题,元素系统导致此错误
error CS0120: An object reference is required for the nonstatic field, method, or property 'Bapiret2.System'
Run Code Online (Sandbox Code Playgroud)
他们是这里描述的解决方案,但我想找到不需要更改WSDL的解决方案
或这个 http://ddkonline.blogspot.com/2009/09/sap-to-microsoft-net-integration-fixes.html
您对此有任何经验以及如何解决?
谢谢miki