我正在尝试连接到 SAP 提供的 Web 服务,但我遇到了身份验证问题。
我只是通过右键单击项目添加服务,选择添加服务引用,为服务提供 WSDL url 并单击确定。(单击确定后询问凭据,我提供了它们)
然后,当我尝试从 serviceclien 对象调用方法时,我收到以下错误消息:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The
authentication header received from the server was 'Basic realm="SAP Web Application
Server <hostname>"'.
Web 配置相关部分:
<basicHttpBinding>
<binding name="binding" 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="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
另外,我会遇到什么问题?我不想使用 SAP .NET 连接器。谢谢...